Displaying 20 results from an estimated 300 matches similar to: "Dynamically created queries"
2019 Jul 11
2
Getting login stats
Hello,
I'm trying to get some IMAP auth stats on a Dovecot 2.3.6 instance, but whatever I declare in metric, it always show 0.
What I want basically is how many IMAP auth attempts there was on the server, and optional a way to filter on the auth attempt status (successful or failed).
My server uses a simple auth (with LDAP backend) and supports only "auth_mechanisms = plain login"
2019 Aug 15
2
2.3.7 + stats
Is there any additional documentation/information around the new stats
module.
Have added some metrics just to see what they produce
##
## Metrics
###
metric imap {
??? event_name = imap_command_finished
??? #source_location = example.c:123
??? #categories =
??? fields = name args running_usecs bytes_in bytes_out
??? #filter {
??? #??? field_key = wildcard
??? #}
}
metric sql {
???
2013 Jan 07
3
renumber a list of numbers
Greetings R users,
I am trying to renumber my groups within the file shown below. The groups
are currently set as 8,9,10,etc. I would like to renumber this as
1,2,3,etc. I have searched the help files and only come across using the
rownames to renumber the values but I need to match values. Any assistance
is always appreciated,
Regards,
Charles
structure(list(Group = structure(c(1L, 1L, 1L,
2006 Jun 14
6
find and LIKE ''xxx%'' clause
Hi there !
I try to figure out how to do something like this in Rails :
SELECT * FROM my_table WHERE name LIKE ''GOGONAM%''
My problem is the % and the quotes.
>From now, I do like this :
searched_name = params[:name]+''%''
user = MyTable.find(:all, :conditions => ["name LIKE ?", searched_name])
But is there a more gracefull way to do a LIKE
2010 Jan 15
1
Sampling from a Postgres database
Hi Everybody
Is there a way in which one can use the RPostgreSQL package to take a sample
from a table in Postgres database without having to read the whole table
into R
regards
Christiaan
[[alternative HTML version deleted]]
2006 Jun 30
3
New release of ez-where plugin
Hello friends-
There is a new release of the ez-where plugin. This plugin makes it
easy to do complex ActiveRecord queries without writing any SQL. Ruby
operators are mapped to SQL operators like so:
foo == ''bar'' #=> ["foo = ?", ''bar'']
foo =~ ''%bar'' #=> ["foo LIKE ?", ''%bar'']
2020 Aug 22
2
Metric label values truncated when using OpenMetrics endpoint
Hi,
Recently we upgraded to Dovecot 2.3.11.3 and configured an example metric like this:
metric imap_command {
event_name = imap_command_finished
group_by = cmd_name tagged_reply_state user remote_ip
}
And enabled the OpenMetrics listener like this:
service stats {
inet_listener http {
port = 5000
}
}
While the result is great, I noticed that some metrics are being truncated
2020 Aug 25
2
Metric label values truncated when using OpenMetrics endpoint
Hi Jeff,
Thanks for your reply!
Regarding grouping by remote address, I understand and for now I'll keep a close eye. Maybe it's an option to group by /24 for ipv4 and /64 for IPv6? We currently do that based on the logs but the OpenMetrics endpoint seem a lot easier.
A slight hijack of the original question: but I tried to log only IP addresses (+ result) of failed login attempts but
2019 Jun 02
4
Stats/Metrics in 2.3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Greetings,
So the changes to the stats modules between v2.2 and v2.3 have broken some
of my monitoring. I am attempting to use the new method of gathering
"metrics" from "events" - but the details in the documentation are a bit
thin.
I started with the examples provided at
https://wiki2.dovecot.org/Statistics and tried to
2020 Sep 19
1
auth_passdb_request_finished request fires twice on IMAP login
Hi,
Dovecot v2.3.11.3 (502c39af9)
auth_passdb_request_finished appears to fire twice for an IMAP login
using a Redis passdb. auth_request_finished only fires once.
In the debug log below, the line "Finished passdb lookup" appears to be
logged twice (once by "auth" and once by "auth-worker"). However, the
actual passdb lookup against Redis is only performed once.
2019 Jul 11
0
Getting login stats
> I'm trying to get some IMAP auth stats on a Dovecot 2.3.6 instance, but whatever I declare in metric, it always show 0.
None of these auth_* requests exist in 2.3.6.
> I tried using the following metrics:
>
>
> --------------------------------
> metric auth_request_finished {
> event_name = auth_request_finished
> }
>
> metric
2006 May 23
3
ez-where headscratch
Hi there,
I''m puzzled by this apparently simple query I can''t manage to reassemble
using ez_where plugin.
cond = Caboose::EZ::Condition.new :my_table do
start_on < Time.now
any {end_on > Time.now; end_on.nil?}
end
I keep getting the following result :
>> cond.to_sql
=> ["my_table.start_on < ? AND (my_table.end_on > ?)", Tue May 23
2006 Feb 22
2
Using ez_where
Hi All,
I am trying to pass values to ez_where to construct my conditions. I
need
to know how the params need to be formated for ez_where.
My search class looks like this:
def search
@display_ad = DisplayAd.new(params[:display_ad])
cond = Caboose::EZ::Condition.new do
pub_date == ''@display_ad.pub_date''
io_number =~
2006 Feb 15
10
STI Question
Hi everyone,
I have 3 types of people (for now):
Staff
Faculty
Students
To break them up into classes, but keep them in the same People table,
I''ve broken them up like so (code and ''ends'' snipped):
class Person < ActiveRecord::Base
class Employee < Person
class Staff < Employee
class Faculty < Employee
class Student < Employee
So, when I insert
2006 Apr 22
4
Slice and dice plugin
I''ve been playing around with some easier ways of specifying
conditions in active record, and have come up with a little plugin
that some may find useful. Currently active record finder and
calculations methods can take a :conditions option with a string or
array listing some sql conditions, eg:
Animals.find :first, :conditions => "name = ''Tiger''"
My
2006 Apr 18
3
ez_where query question
I''m having fun composing queries with ez_where, but am stuck on how to
formulate the following using the ez syntax:
(begin_date >= ? OR end_date >= ?) AND (description LIKE ? OR name LIKE ?)
There are two clauses, each containing OR operators (the ez ''any'' syntax)
but both clauses must evaulate to true for a match.
Can anyone suggest the proper way to construct
2006 May 02
3
Writing tests for plugins
I''ve been googling around trying to find some tips on creating tests for
plugins. Am I correct in assuming that I''d have to have the tests as
part of a rails app in order to test the plugin? I''d like to find a way
to do standalone tests for the plugin.
--
Posted via http://www.ruby-forum.com/.
2006 Mar 22
4
How to write this SQL query?
Hi!
Is there rails version of "where column in (value1, value2, ...)"?
I know i could do OR many times, but this way is shorter.
I''m ruby/rails newbie, so i have a problem with converting the hash,
which i''m receving from the search form into the string for :conditions
in find method.
Could i instead of creating one, complicated (for me) query do something
like
2006 Feb 24
2
raking my brain to fix this
I am ''raking'' my brain to fix this problem - I have searched, googled,
looked through rake documentation, wiki.rubyonrails and I can''t fix...
This works
$ rake plugindoc
(in /home/craig/ruby-db/th-db)
rdoc -o doc/plugins/ez_where --title ''Ez Where Plugin Documentation'' --
line-numbers --inline-source -T html
2018 Jan 19
1
Fatal: nfs flush requires mail_fsync=always
Hiya all,
I'm seeing this "Fatal: nfs flush requires mail_fsync=always" error on
my testbed. The issue is that from what I can see, mail_fsync is set
to always :
# doveconf -n | grep mail_fs
mail_fsync = always
The result is that the client does not connect at all, which is not
really what I wanted to happen :)
Any idea what is going wrong here?
Best regards
S?ren P. Skou