stats module

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

stats module

Jeff Abrahamson
I'd like to monitor my dovecot instance (running on ubuntu 16.04) using
telegraf.

    [T] jeff@nantes-1:log $ dovecot --version
    2.2.22 (fe789d2)
    [T] jeff@nantes-1:log $

To do that, I think I need to use the stats module and get it to talk on
port 24242.  I've not found enough documentation on this module to feel
really comfortable with it, so it doesn't surprise me that I don't have
it working.  But I'd much appreciate if someone could point me in the
right direction.

In particular, nothing listens on 24242.

    # This file is based on https://wiki2.dovecot.org/Statistics

    # Dovecot v2.1+ supports gathering statistics (CPU, disk usage, etc.)
    # from mail processes (IMAP, POP3, LMTP, etc.) to the stats
    # process. The stats process can later be queried what's going on in
    # the system. With imap_stats plugin you can get per-command level
    # statistics for IMAP commands.
    #
    # There are different "zoom levels" you can look at the statistics:
    #
    # * command: Per-IMAP command
    # * session: Per IMAP/POP3 connection
    # * user: Per user (all of user's sessions summed up)
    # * domain: Per domain (all of domain's users summed up)
    # * ip: Per IP address (all sessions from the IP summed up)
    # * global: Everything summed up (2.2.16+)

    mail_plugins = $mail_plugins stats
    protocol imap {
      mail_plugins = $mail_plugins imap_stats
    }
    plugin {
      # how often to session statistics (must be set)
      stats_refresh = 30 secs
      # track per-IMAP command statistics (optional)
      stats_track_cmds = yes
    }

    # You'll also need to give enough permissions for mail processes to be
    # able to write to stats-mail fifo. For example if you use a single
    # "vmail" user for mail access:
    service stats {
      fifo_listener stats-mail {
        user = vmail
        mode = 0600
      }
    }

    # Memory usage configuration

    # The stats process attempts to keep memory usage below a specified
    # amount. This value is only approximate because of extra overhead
    # caused by malloc() itself.

    stats_memory_limit = 16 M

    # Once the memory limit is reached, oldest statistics are freed from
    # memory. Different statistics levels have different timeout limits,
    # which are configured in:

    stats_command_min_time = 1 mins
    stats_domain_min_time = 12 hours
    stats_ip_min_time = 12 hours
    stats_session_min_time = 15 mins
    stats_user_min_time = 1 hours

    service stats {
      inet_listener {
        address = 127.0.0.1
        port = 24242
      }
    }

Thanks in advance.

--

Jeff Abrahamson
+33 6 24 40 01 57
+44 7920 594 255

http://p27.eu/jeff/

Reply | Threaded
Open this post in threaded view
|

Re: stats module

Aki Tuomi-2
Hi!

To add inet listener for stats, do

service stats {
   inet_listener {
      port = 24242
  }
}

Aki


On 02.11.2017 23:22, Jeff Abrahamson wrote:

> I'd like to monitor my dovecot instance (running on ubuntu 16.04) using
> telegraf.
>
>     [T] jeff@nantes-1:log $ dovecot --version
>     2.2.22 (fe789d2)
>     [T] jeff@nantes-1:log $
>
> To do that, I think I need to use the stats module and get it to talk on
> port 24242.  I've not found enough documentation on this module to feel
> really comfortable with it, so it doesn't surprise me that I don't have
> it working.  But I'd much appreciate if someone could point me in the
> right direction.
>
> In particular, nothing listens on 24242.
>
>     # This file is based on https://wiki2.dovecot.org/Statistics
>
>     # Dovecot v2.1+ supports gathering statistics (CPU, disk usage, etc.)
>     # from mail processes (IMAP, POP3, LMTP, etc.) to the stats
>     # process. The stats process can later be queried what's going on in
>     # the system. With imap_stats plugin you can get per-command level
>     # statistics for IMAP commands.
>     #
>     # There are different "zoom levels" you can look at the statistics:
>     #
>     # * command: Per-IMAP command
>     # * session: Per IMAP/POP3 connection
>     # * user: Per user (all of user's sessions summed up)
>     # * domain: Per domain (all of domain's users summed up)
>     # * ip: Per IP address (all sessions from the IP summed up)
>     # * global: Everything summed up (2.2.16+)
>
>     mail_plugins = $mail_plugins stats
>     protocol imap {
>       mail_plugins = $mail_plugins imap_stats
>     }
>     plugin {
>       # how often to session statistics (must be set)
>       stats_refresh = 30 secs
>       # track per-IMAP command statistics (optional)
>       stats_track_cmds = yes
>     }
>
>     # You'll also need to give enough permissions for mail processes to be
>     # able to write to stats-mail fifo. For example if you use a single
>     # "vmail" user for mail access:
>     service stats {
>       fifo_listener stats-mail {
>         user = vmail
>         mode = 0600
>       }
>     }
>
>     # Memory usage configuration
>
>     # The stats process attempts to keep memory usage below a specified
>     # amount. This value is only approximate because of extra overhead
>     # caused by malloc() itself.
>
>     stats_memory_limit = 16 M
>
>     # Once the memory limit is reached, oldest statistics are freed from
>     # memory. Different statistics levels have different timeout limits,
>     # which are configured in:
>
>     stats_command_min_time = 1 mins
>     stats_domain_min_time = 12 hours
>     stats_ip_min_time = 12 hours
>     stats_session_min_time = 15 mins
>     stats_user_min_time = 1 hours
>
>     service stats {
>       inet_listener {
>         address = 127.0.0.1
>         port = 24242
>       }
>     }
>
> Thanks in advance.
>
Reply | Threaded
Open this post in threaded view
|

Re: stats module

Steffen Kaiser-9
In reply to this post by Jeff Abrahamson
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 2 Nov 2017, Jeff Abrahamson wrote:

> In particular, nothing listens on 24242.
>
>     service stats {
>       inet_listener {
>         address = 127.0.0.1
>         port = 24242
>       }
>     }

my conf looks almost identitical. This should do the trick, IMHO.

check "doveconf -n" to see, if you have a typo somewhere or any errors
show up. Second check out the error log (there might be (re)bind
failures). Third, make sure you have restarted Dovecot.

- --
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEVAwUBWfwVaXz1H7kL/d9rAQJDHgf5AY9MxGxWjEKja9w+DdiSmzSwpNuJ57Fa
kbkU8TAWQrrfJ6/uZlA7YZtFqA51HFqIO4vX+kEC2qHXJBq59x00T9CktAWAm0Cj
+48fsSiAUi8A28VW+I6GTBpDaoW1d/9aZnIg3Md+QXkD7ydWwKG3V34zXxdUE4Aw
mD8iPLCU8zjw9r0Yrwo51OA8yx+J0wRd06br50gDco09oNoQDBJueJyfhC4Dmlcr
ELulm5g2D4WOSZpSVF+wAMjgaXeC/Tf97obuGqd7aq5/F6M3Bqo60ZaBPlizUpeY
F9NSBGFCkhfSGq/mwXTWaDSveC1fG6RCW4mo85JUkhzb24kSEjEbDg==
=/yUC
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: stats module

Jeff Abrahamson
Thanks for your suggestions, Steffen.

Running doveconf -n shows no errors and also, sadly, no mention of the
stats listener:

    ╭╴ (master=)╶╮
    ╰ [T] jeff@nantes-1:p27 $ doveconf -n
    # 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
    # Pigeonhole version 0.4.13 (7b14904)
    # OS: Linux 4.4.0-97-generic x86_64 Ubuntu 16.04.3 LTS
    auth_mechanisms = plain login
    auth_socket_path = /var/run/dovecot/auth-userdb
    mail_location = maildir:~/Maildir
    managesieve_notify_capability = mailto
    managesieve_sieve_capability = fileinto reject envelope
    encoded-character vacation subaddress comparator-i;ascii-numeric
    relational regex imap4flags copy include variables body enotify
    environment mailbox date index ihave duplicate mime foreverypart
    extracttext
    namespace inbox {
      inbox = yes
      location =
      mailbox Drafts {
        special_use = \Drafts
      }
      mailbox Junk {
        special_use = \Junk
      }
      mailbox Sent {
        special_use = \Sent
      }
      mailbox "Sent Messages" {
        special_use = \Sent
      }
      mailbox Trash {
        special_use = \Trash
      }
      prefix =
    }
    passdb {
      driver = pam
    }
    plugin {
      sieve = ~/.dovecot.sieve
      sieve_dir = ~/sieve
    }
    protocols = imap sieve
    service auth {
      unix_listener /var/spool/postfix/private/auth {
        group = postfix
        mode = 0666
        user = postfix
      }
      unix_listener /var/spool/postfix/private/dovecot-auth {
        group = postfix
        mode = 0660
        user = postfix
      }
    }
    service imap-login {
      inet_listener imaps {
        port = 993
        ssl = yes
      }
    }
    ssl_cert = </etc/dovecot/dovecot.pem
    ssl_cipher_list =
    EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
    ssl_key = </etc/dovecot/private/dovecot.pem
    ssl_protocols = !SSLv2 !SSLv3
    userdb {
      driver = passwd
    }
    protocol lda {
      deliver_log_format = msgid=%m: %$
      mail_plugins = sieve
      postmaster_address = postmaster
      quota_full_tempfail = yes
      rejection_reason = Your message to <%t> was automatically
    rejected:%n%r
    }
    protocol imap {
      imap_client_workarounds = delay-newmail
      mail_max_userip_connections = 20
    }
    protocol pop3 {
      mail_max_userip_connections = 10
      pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
    }
    ╭╴ (master=)╶╮
    ╰ [T] jeff@nantes-1:p27 $

Here I have a tail -f /var/log/mail.log and mail.err running in the
background so we can see the results of the restart:

    [T] jeff@nantes-1:conf.d $ ls -l
    total 136
    -rw-r--r-- 1 root root  5301 Aug 25 15:26 10-auth.conf
    -rw-r--r-- 1 root root  1893 Mar 16  2016 10-director.conf
    -rw-r--r-- 1 root root  2805 Mar 16  2016 10-logging.conf
    -rw-r--r-- 1 root root 16172 Aug 25 15:35 10-mail.conf
    -rw-r--r-- 1 root root  3547 Aug 25 15:40 10-master.conf
    -rw-r--r-- 1 root root  2307 Aug 25 16:27 10-ssl.conf
    -rw-r--r-- 1 root root   291 Apr 11  2017 10-tcpwrapper.conf
    -rw-r--r-- 1 root root  1668 Mar 16  2016 15-lda.conf
    -rw-r--r-- 1 root root  2808 Mar 16  2016 15-mailboxes.conf
    -rw-r--r-- 1 root root  3295 Mar 16  2016 20-imap.conf
    -rw-r--r-- 1 root root  2398 Apr 11  2017 20-managesieve.conf
    -rw-r--r-- 1 root root  4109 Aug 25 15:28 20-pop3.conf
    -rw-r--r-- 1 root root   676 Mar 16  2016 90-acl.conf
    -rw-r--r-- 1 root root   292 Mar 16  2016 90-plugin.conf
    -rw-r--r-- 1 root root  2502 Mar 16  2016 90-quota.conf
    -rw-r--r-- 1 root root  6822 Apr 11  2017 90-sieve.conf
    -rw-r--r-- 1 root root  1829 Apr 11  2017 90-sieve-extprograms.conf
    -rw-r--r-- 1 root root  1856 Nov  3 16:11 91-stats
    -rw-r--r-- 1 root root  1430 Oct 31 16:33 99-mail-stack-delivery.conf
    -rw-r--r-- 1 root root   499 Mar 16  2016 auth-checkpassword.conf.ext
    -rw-r--r-- 1 root root   489 Mar 16  2016 auth-deny.conf.ext
    -rw-r--r-- 1 root root   343 Mar 16  2016 auth-dict.conf.ext
    -rw-r--r-- 1 root root   561 Mar 16  2016 auth-master.conf.ext
    -rw-r--r-- 1 root root   515 Mar 16  2016 auth-passwdfile.conf.ext
    -rw-r--r-- 1 root root   788 Mar 16  2016 auth-sql.conf.ext
    -rw-r--r-- 1 root root   611 Mar 16  2016 auth-static.conf.ext
    -rw-r--r-- 1 root root  2185 Mar 16  2016 auth-system.conf.ext
    -rw-r--r-- 1 root root   330 Mar 16  2016 auth-vpopmail.conf.ext
    [T] jeff@nantes-1:conf.d $ sudo service dovecot restart
    Nov  3 16:14:26 nantes-1 dovecot: master: Warning: Killed with
    signal 15 (by pid=5845 uid=0 code=kill)
    Nov  3 16:14:26 nantes-1 dovecot: imap(jeff): Server shutting down.
    in=3514 out=2605
    Nov  3 16:14:26 nantes-1 dovecot: master: Dovecot v2.2.22 (fe789d2)
    starting up for imap, sieve (core dumps disabled)
    [T] jeff@nantes-1:conf.d $

No errors there, either.

And, just to be clear that I'm not missing anything:

    ╭╴ (master=)╶╮
    ╰ [T] jeff@nantes-1:p27 $ netstat -a | grep 242
    ╭╴ (master=)╶╮
    ╰ 1,[T] jeff@nantes-1:p27 $ doveconf -n | grep stat
    ╭╴ (master=)╶╮
    ╰ 1,[T] jeff@nantes-1:p27 $

The file 91-stats contains the contents I pasted in my earlier mail. 
I'm a bit unclear what to check next.

Jeff


On 03/11/17 08:06, Steffen Kaiser wrote:

> On Thu, 2 Nov 2017, Jeff Abrahamson wrote:
>
> > In particular, nothing listens on 24242.
>
> >     service stats {
> >       inet_listener {
> >         address = 127.0.0.1
> >         port = 24242
> >       }
> >     }
>
> my conf looks almost identitical. This should do the trick, IMHO.
>
> check "doveconf -n" to see, if you have a typo somewhere or any errors
> show up. Second check out the error log (there might be (re)bind
> failures). Third, make sure you have restarted Dovecot.
>
> -- Steffen Kaiser

--

Jeff Abrahamson
+33 6 24 40 01 57
+44 7920 594 255

http://p27.eu/jeff/
Reply | Threaded
Open this post in threaded view
|

Re: stats module

Aki Tuomi-2
You need to add the stats listener, by yourself.

Aki

> On November 3, 2017 at 5:19 PM Jeff Abrahamson <[hidden email]> wrote:
>
>
> Thanks for your suggestions, Steffen.
>
> Running doveconf -n shows no errors and also, sadly, no mention of the
> stats listener:
>
>     ╭╴ (master=)╶╮
>     ╰ [T] jeff@nantes-1:p27 $ doveconf -n
>     # 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
>     # Pigeonhole version 0.4.13 (7b14904)
>     # OS: Linux 4.4.0-97-generic x86_64 Ubuntu 16.04.3 LTS
>     auth_mechanisms = plain login
>     auth_socket_path = /var/run/dovecot/auth-userdb
>     mail_location = maildir:~/Maildir
>     managesieve_notify_capability = mailto
>     managesieve_sieve_capability = fileinto reject envelope
>     encoded-character vacation subaddress comparator-i;ascii-numeric
>     relational regex imap4flags copy include variables body enotify
>     environment mailbox date index ihave duplicate mime foreverypart
>     extracttext
>     namespace inbox {
>       inbox = yes
>       location =
>       mailbox Drafts {
>         special_use = \Drafts
>       }
>       mailbox Junk {
>         special_use = \Junk
>       }
>       mailbox Sent {
>         special_use = \Sent
>       }
>       mailbox "Sent Messages" {
>         special_use = \Sent
>       }
>       mailbox Trash {
>         special_use = \Trash
>       }
>       prefix =
>     }
>     passdb {
>       driver = pam
>     }
>     plugin {
>       sieve = ~/.dovecot.sieve
>       sieve_dir = ~/sieve
>     }
>     protocols = imap sieve
>     service auth {
>       unix_listener /var/spool/postfix/private/auth {
>         group = postfix
>         mode = 0666
>         user = postfix
>       }
>       unix_listener /var/spool/postfix/private/dovecot-auth {
>         group = postfix
>         mode = 0660
>         user = postfix
>       }
>     }
>     service imap-login {
>       inet_listener imaps {
>         port = 993
>         ssl = yes
>       }
>     }
>     ssl_cert = </etc/dovecot/dovecot.pem
>     ssl_cipher_list =
>     EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
>     ssl_key = </etc/dovecot/private/dovecot.pem
>     ssl_protocols = !SSLv2 !SSLv3
>     userdb {
>       driver = passwd
>     }
>     protocol lda {
>       deliver_log_format = msgid=%m: %$
>       mail_plugins = sieve
>       postmaster_address = postmaster
>       quota_full_tempfail = yes
>       rejection_reason = Your message to <%t> was automatically
>     rejected:%n%r
>     }
>     protocol imap {
>       imap_client_workarounds = delay-newmail
>       mail_max_userip_connections = 20
>     }
>     protocol pop3 {
>       mail_max_userip_connections = 10
>       pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
>     }
>     ╭╴ (master=)╶╮
>     ╰ [T] jeff@nantes-1:p27 $
>
> Here I have a tail -f /var/log/mail.log and mail.err running in the
> background so we can see the results of the restart:
>
>     [T] jeff@nantes-1:conf.d $ ls -l
>     total 136
>     -rw-r--r-- 1 root root  5301 Aug 25 15:26 10-auth.conf
>     -rw-r--r-- 1 root root  1893 Mar 16  2016 10-director.conf
>     -rw-r--r-- 1 root root  2805 Mar 16  2016 10-logging.conf
>     -rw-r--r-- 1 root root 16172 Aug 25 15:35 10-mail.conf
>     -rw-r--r-- 1 root root  3547 Aug 25 15:40 10-master.conf
>     -rw-r--r-- 1 root root  2307 Aug 25 16:27 10-ssl.conf
>     -rw-r--r-- 1 root root   291 Apr 11  2017 10-tcpwrapper.conf
>     -rw-r--r-- 1 root root  1668 Mar 16  2016 15-lda.conf
>     -rw-r--r-- 1 root root  2808 Mar 16  2016 15-mailboxes.conf
>     -rw-r--r-- 1 root root  3295 Mar 16  2016 20-imap.conf
>     -rw-r--r-- 1 root root  2398 Apr 11  2017 20-managesieve.conf
>     -rw-r--r-- 1 root root  4109 Aug 25 15:28 20-pop3.conf
>     -rw-r--r-- 1 root root   676 Mar 16  2016 90-acl.conf
>     -rw-r--r-- 1 root root   292 Mar 16  2016 90-plugin.conf
>     -rw-r--r-- 1 root root  2502 Mar 16  2016 90-quota.conf
>     -rw-r--r-- 1 root root  6822 Apr 11  2017 90-sieve.conf
>     -rw-r--r-- 1 root root  1829 Apr 11  2017 90-sieve-extprograms.conf
>     -rw-r--r-- 1 root root  1856 Nov  3 16:11 91-stats
>     -rw-r--r-- 1 root root  1430 Oct 31 16:33 99-mail-stack-delivery.conf
>     -rw-r--r-- 1 root root   499 Mar 16  2016 auth-checkpassword.conf.ext
>     -rw-r--r-- 1 root root   489 Mar 16  2016 auth-deny.conf.ext
>     -rw-r--r-- 1 root root   343 Mar 16  2016 auth-dict.conf.ext
>     -rw-r--r-- 1 root root   561 Mar 16  2016 auth-master.conf.ext
>     -rw-r--r-- 1 root root   515 Mar 16  2016 auth-passwdfile.conf.ext
>     -rw-r--r-- 1 root root   788 Mar 16  2016 auth-sql.conf.ext
>     -rw-r--r-- 1 root root   611 Mar 16  2016 auth-static.conf.ext
>     -rw-r--r-- 1 root root  2185 Mar 16  2016 auth-system.conf.ext
>     -rw-r--r-- 1 root root   330 Mar 16  2016 auth-vpopmail.conf.ext
>     [T] jeff@nantes-1:conf.d $ sudo service dovecot restart
>     Nov  3 16:14:26 nantes-1 dovecot: master: Warning: Killed with
>     signal 15 (by pid=5845 uid=0 code=kill)
>     Nov  3 16:14:26 nantes-1 dovecot: imap(jeff): Server shutting down.
>     in=3514 out=2605
>     Nov  3 16:14:26 nantes-1 dovecot: master: Dovecot v2.2.22 (fe789d2)
>     starting up for imap, sieve (core dumps disabled)
>     [T] jeff@nantes-1:conf.d $
>
> No errors there, either.
>
> And, just to be clear that I'm not missing anything:
>
>     ╭╴ (master=)╶╮
>     ╰ [T] jeff@nantes-1:p27 $ netstat -a | grep 242
>     ╭╴ (master=)╶╮
>     ╰ 1,[T] jeff@nantes-1:p27 $ doveconf -n | grep stat
>     ╭╴ (master=)╶╮
>     ╰ 1,[T] jeff@nantes-1:p27 $
>
> The file 91-stats contains the contents I pasted in my earlier mail. 
> I'm a bit unclear what to check next.
>
> Jeff
>
>
> On 03/11/17 08:06, Steffen Kaiser wrote:
> > On Thu, 2 Nov 2017, Jeff Abrahamson wrote:
> >
> > > In particular, nothing listens on 24242.
> >
> > >     service stats {
> > >       inet_listener {
> > >         address = 127.0.0.1
> > >         port = 24242
> > >       }
> > >     }
> >
> > my conf looks almost identitical. This should do the trick, IMHO.
> >
> > check "doveconf -n" to see, if you have a typo somewhere or any errors
> > show up. Second check out the error log (there might be (re)bind
> > failures). Third, make sure you have restarted Dovecot.
> >
> > -- Steffen Kaiser
>
> --
>
> Jeff Abrahamson
> +33 6 24 40 01 57
> +44 7920 594 255
>
> http://p27.eu/jeff/
Reply | Threaded
Open this post in threaded view
|

Re: stats module

Jeff Abrahamson
Sorry, Aki, I don't follow you.  Did I do it wrong in the file 91-stats
that I shared in my original mail (attached here)?

Jeff


On 03/11/17 16:50, Aki Tuomi wrote:

> You need to add the stats listener, by yourself.
>
> Aki
>
>> On November 3, 2017 at 5:19 PM Jeff Abrahamson <[hidden email]> wrote:
>>
>>
>> Thanks for your suggestions, Steffen.
>>
>> Running doveconf -n shows no errors and also, sadly, no mention of the
>> stats listener:
>>
>>     ╭╴ (master=)╶╮
>>     ╰ [T] jeff@nantes-1:p27 $ doveconf -n
>>     # 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
>>     # Pigeonhole version 0.4.13 (7b14904)
>>     # OS: Linux 4.4.0-97-generic x86_64 Ubuntu 16.04.3 LTS
>>     auth_mechanisms = plain login
>>     auth_socket_path = /var/run/dovecot/auth-userdb
>>     mail_location = maildir:~/Maildir
>>     managesieve_notify_capability = mailto
>>     managesieve_sieve_capability = fileinto reject envelope
>>     encoded-character vacation subaddress comparator-i;ascii-numeric
>>     relational regex imap4flags copy include variables body enotify
>>     environment mailbox date index ihave duplicate mime foreverypart
>>     extracttext
>>     namespace inbox {
>>       inbox = yes
>>       location =
>>       mailbox Drafts {
>>         special_use = \Drafts
>>       }
>>       mailbox Junk {
>>         special_use = \Junk
>>       }
>>       mailbox Sent {
>>         special_use = \Sent
>>       }
>>       mailbox "Sent Messages" {
>>         special_use = \Sent
>>       }
>>       mailbox Trash {
>>         special_use = \Trash
>>       }
>>       prefix =
>>     }
>>     passdb {
>>       driver = pam
>>     }
>>     plugin {
>>       sieve = ~/.dovecot.sieve
>>       sieve_dir = ~/sieve
>>     }
>>     protocols = imap sieve
>>     service auth {
>>       unix_listener /var/spool/postfix/private/auth {
>>         group = postfix
>>         mode = 0666
>>         user = postfix
>>       }
>>       unix_listener /var/spool/postfix/private/dovecot-auth {
>>         group = postfix
>>         mode = 0660
>>         user = postfix
>>       }
>>     }
>>     service imap-login {
>>       inet_listener imaps {
>>         port = 993
>>         ssl = yes
>>       }
>>     }
>>     ssl_cert = </etc/dovecot/dovecot.pem
>>     ssl_cipher_list =
>>     EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
>>     ssl_key = </etc/dovecot/private/dovecot.pem
>>     ssl_protocols = !SSLv2 !SSLv3
>>     userdb {
>>       driver = passwd
>>     }
>>     protocol lda {
>>       deliver_log_format = msgid=%m: %$
>>       mail_plugins = sieve
>>       postmaster_address = postmaster
>>       quota_full_tempfail = yes
>>       rejection_reason = Your message to <%t> was automatically
>>     rejected:%n%r
>>     }
>>     protocol imap {
>>       imap_client_workarounds = delay-newmail
>>       mail_max_userip_connections = 20
>>     }
>>     protocol pop3 {
>>       mail_max_userip_connections = 10
>>       pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
>>     }
>>     ╭╴ (master=)╶╮
>>     ╰ [T] jeff@nantes-1:p27 $
>>
>> Here I have a tail -f /var/log/mail.log and mail.err running in the
>> background so we can see the results of the restart:
>>
>>     [T] jeff@nantes-1:conf.d $ ls -l
>>     total 136
>>     -rw-r--r-- 1 root root  5301 Aug 25 15:26 10-auth.conf
>>     -rw-r--r-- 1 root root  1893 Mar 16  2016 10-director.conf
>>     -rw-r--r-- 1 root root  2805 Mar 16  2016 10-logging.conf
>>     -rw-r--r-- 1 root root 16172 Aug 25 15:35 10-mail.conf
>>     -rw-r--r-- 1 root root  3547 Aug 25 15:40 10-master.conf
>>     -rw-r--r-- 1 root root  2307 Aug 25 16:27 10-ssl.conf
>>     -rw-r--r-- 1 root root   291 Apr 11  2017 10-tcpwrapper.conf
>>     -rw-r--r-- 1 root root  1668 Mar 16  2016 15-lda.conf
>>     -rw-r--r-- 1 root root  2808 Mar 16  2016 15-mailboxes.conf
>>     -rw-r--r-- 1 root root  3295 Mar 16  2016 20-imap.conf
>>     -rw-r--r-- 1 root root  2398 Apr 11  2017 20-managesieve.conf
>>     -rw-r--r-- 1 root root  4109 Aug 25 15:28 20-pop3.conf
>>     -rw-r--r-- 1 root root   676 Mar 16  2016 90-acl.conf
>>     -rw-r--r-- 1 root root   292 Mar 16  2016 90-plugin.conf
>>     -rw-r--r-- 1 root root  2502 Mar 16  2016 90-quota.conf
>>     -rw-r--r-- 1 root root  6822 Apr 11  2017 90-sieve.conf
>>     -rw-r--r-- 1 root root  1829 Apr 11  2017 90-sieve-extprograms.conf
>>     -rw-r--r-- 1 root root  1856 Nov  3 16:11 91-stats
>>     -rw-r--r-- 1 root root  1430 Oct 31 16:33 99-mail-stack-delivery.conf
>>     -rw-r--r-- 1 root root   499 Mar 16  2016 auth-checkpassword.conf.ext
>>     -rw-r--r-- 1 root root   489 Mar 16  2016 auth-deny.conf.ext
>>     -rw-r--r-- 1 root root   343 Mar 16  2016 auth-dict.conf.ext
>>     -rw-r--r-- 1 root root   561 Mar 16  2016 auth-master.conf.ext
>>     -rw-r--r-- 1 root root   515 Mar 16  2016 auth-passwdfile.conf.ext
>>     -rw-r--r-- 1 root root   788 Mar 16  2016 auth-sql.conf.ext
>>     -rw-r--r-- 1 root root   611 Mar 16  2016 auth-static.conf.ext
>>     -rw-r--r-- 1 root root  2185 Mar 16  2016 auth-system.conf.ext
>>     -rw-r--r-- 1 root root   330 Mar 16  2016 auth-vpopmail.conf.ext
>>     [T] jeff@nantes-1:conf.d $ sudo service dovecot restart
>>     Nov  3 16:14:26 nantes-1 dovecot: master: Warning: Killed with
>>     signal 15 (by pid=5845 uid=0 code=kill)
>>     Nov  3 16:14:26 nantes-1 dovecot: imap(jeff): Server shutting down.
>>     in=3514 out=2605
>>     Nov  3 16:14:26 nantes-1 dovecot: master: Dovecot v2.2.22 (fe789d2)
>>     starting up for imap, sieve (core dumps disabled)
>>     [T] jeff@nantes-1:conf.d $
>>
>> No errors there, either.
>>
>> And, just to be clear that I'm not missing anything:
>>
>>     ╭╴ (master=)╶╮
>>     ╰ [T] jeff@nantes-1:p27 $ netstat -a | grep 242
>>     ╭╴ (master=)╶╮
>>     ╰ 1,[T] jeff@nantes-1:p27 $ doveconf -n | grep stat
>>     ╭╴ (master=)╶╮
>>     ╰ 1,[T] jeff@nantes-1:p27 $
>>
>> The file 91-stats contains the contents I pasted in my earlier mail. 
>> I'm a bit unclear what to check next.
>>
>> Jeff
>>
>>
>> On 03/11/17 08:06, Steffen Kaiser wrote:
>>> On Thu, 2 Nov 2017, Jeff Abrahamson wrote:
>>>
>>>> In particular, nothing listens on 24242.
>>>>      service stats {
>>>>        inet_listener {
>>>>          address = 127.0.0.1
>>>>          port = 24242
>>>>        }
>>>>      }
>>> my conf looks almost identitical. This should do the trick, IMHO.
>>>
>>> check "doveconf -n" to see, if you have a typo somewhere or any errors
>>> show up. Second check out the error log (there might be (re)bind
>>> failures). Third, make sure you have restarted Dovecot.
>>>
>>> -- Steffen Kaiser
>> --
>>
>> Jeff Abrahamson
>> +33 6 24 40 01 57
>> +44 7920 594 255
>>
>> http://p27.eu/jeff/
--

Jeff Abrahamson
+33 6 24 40 01 57
+44 7920 594 255

http://p27.eu/jeff/


91-stats (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: stats module

Mark Moseley
On Fri, Nov 3, 2017 at 9:35 AM, Jeff Abrahamson <[hidden email]> wrote:

> Sorry, Aki, I don't follow you.  Did I do it wrong in the file 91-stats
> that I shared in my original mail (attached here)?
>
> Jeff
>
>
> On 03/11/17 16:50, Aki Tuomi wrote:
> > You need to add the stats listener, by yourself.
> >
> > Aki
> >
> >> On November 3, 2017 at 5:19 PM Jeff Abrahamson <[hidden email]> wrote:
> >>
> >>
> >> Thanks for your suggestions, Steffen.
> >>
> >> Running doveconf -n shows no errors and also, sadly, no mention of the
> >> stats listener:
> >>
> >>     ╭╴ (master=)╶╮
> >>     ╰ [T] jeff@nantes-1:p27 $ doveconf -n
> >>     # 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
> >>     # Pigeonhole version 0.4.13 (7b14904)
> >>     # OS: Linux 4.4.0-97-generic x86_64 Ubuntu 16.04.3 LTS
> >>     auth_mechanisms = plain login
> >>     auth_socket_path = /var/run/dovecot/auth-userdb
> >>     mail_location = maildir:~/Maildir
> >>     managesieve_notify_capability = mailto
> >>     managesieve_sieve_capability = fileinto reject envelope
> >>     encoded-character vacation subaddress comparator-i;ascii-numeric
> >>     relational regex imap4flags copy include variables body enotify
> >>     environment mailbox date index ihave duplicate mime foreverypart
> >>     extracttext
> >>     namespace inbox {
> >>       inbox = yes
> >>       location =
> >>       mailbox Drafts {
> >>         special_use = \Drafts
> >>       }
> >>       mailbox Junk {
> >>         special_use = \Junk
> >>       }
> >>       mailbox Sent {
> >>         special_use = \Sent
> >>       }
> >>       mailbox "Sent Messages" {
> >>         special_use = \Sent
> >>       }
> >>       mailbox Trash {
> >>         special_use = \Trash
> >>       }
> >>       prefix =
> >>     }
> >>     passdb {
> >>       driver = pam
> >>     }
> >>     plugin {
> >>       sieve = ~/.dovecot.sieve
> >>       sieve_dir = ~/sieve
> >>     }
> >>     protocols = imap sieve
> >>     service auth {
> >>       unix_listener /var/spool/postfix/private/auth {
> >>         group = postfix
> >>         mode = 0666
> >>         user = postfix
> >>       }
> >>       unix_listener /var/spool/postfix/private/dovecot-auth {
> >>         group = postfix
> >>         mode = 0660
> >>         user = postfix
> >>       }
> >>     }
> >>     service imap-login {
> >>       inet_listener imaps {
> >>         port = 993
> >>         ssl = yes
> >>       }
> >>     }
> >>     ssl_cert = </etc/dovecot/dovecot.pem
> >>     ssl_cipher_list =
> >>     EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:
> EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!
> aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!
> ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
> >>     ssl_key = </etc/dovecot/private/dovecot.pem
> >>     ssl_protocols = !SSLv2 !SSLv3
> >>     userdb {
> >>       driver = passwd
> >>     }
> >>     protocol lda {
> >>       deliver_log_format = msgid=%m: %$
> >>       mail_plugins = sieve
> >>       postmaster_address = postmaster
> >>       quota_full_tempfail = yes
> >>       rejection_reason = Your message to <%t> was automatically
> >>     rejected:%n%r
> >>     }
> >>     protocol imap {
> >>       imap_client_workarounds = delay-newmail
> >>       mail_max_userip_connections = 20
> >>     }
> >>     protocol pop3 {
> >>       mail_max_userip_connections = 10
> >>       pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
> >>     }
> >>     ╭╴ (master=)╶╮
> >>     ╰ [T] jeff@nantes-1:p27 $
> >>
> >> Here I have a tail -f /var/log/mail.log and mail.err running in the
> >> background so we can see the results of the restart:
> >>
> >>     [T] jeff@nantes-1:conf.d $ ls -l
> >>     total 136
> >>     -rw-r--r-- 1 root root  5301 Aug 25 15:26 10-auth.conf
> >>     -rw-r--r-- 1 root root  1893 Mar 16  2016 10-director.conf
> >>     -rw-r--r-- 1 root root  2805 Mar 16  2016 10-logging.conf
> >>     -rw-r--r-- 1 root root 16172 Aug 25 15:35 10-mail.conf
> >>     -rw-r--r-- 1 root root  3547 Aug 25 15:40 10-master.conf
> >>     -rw-r--r-- 1 root root  2307 Aug 25 16:27 10-ssl.conf
> >>     -rw-r--r-- 1 root root   291 Apr 11  2017 10-tcpwrapper.conf
> >>     -rw-r--r-- 1 root root  1668 Mar 16  2016 15-lda.conf
> >>     -rw-r--r-- 1 root root  2808 Mar 16  2016 15-mailboxes.conf
> >>     -rw-r--r-- 1 root root  3295 Mar 16  2016 20-imap.conf
> >>     -rw-r--r-- 1 root root  2398 Apr 11  2017 20-managesieve.conf
> >>     -rw-r--r-- 1 root root  4109 Aug 25 15:28 20-pop3.conf
> >>     -rw-r--r-- 1 root root   676 Mar 16  2016 90-acl.conf
> >>     -rw-r--r-- 1 root root   292 Mar 16  2016 90-plugin.conf
> >>     -rw-r--r-- 1 root root  2502 Mar 16  2016 90-quota.conf
> >>     -rw-r--r-- 1 root root  6822 Apr 11  2017 90-sieve.conf
> >>     -rw-r--r-- 1 root root  1829 Apr 11  2017 90-sieve-extprograms.conf
> >>     -rw-r--r-- 1 root root  1856 Nov  3 16:11 91-stats
> >>     -rw-r--r-- 1 root root  1430 Oct 31 16:33
> 99-mail-stack-delivery.conf
> >>     -rw-r--r-- 1 root root   499 Mar 16  2016
> auth-checkpassword.conf.ext
> >>     -rw-r--r-- 1 root root   489 Mar 16  2016 auth-deny.conf.ext
> >>     -rw-r--r-- 1 root root   343 Mar 16  2016 auth-dict.conf.ext
> >>     -rw-r--r-- 1 root root   561 Mar 16  2016 auth-master.conf.ext
> >>     -rw-r--r-- 1 root root   515 Mar 16  2016 auth-passwdfile.conf.ext
> >>     -rw-r--r-- 1 root root   788 Mar 16  2016 auth-sql.conf.ext
> >>     -rw-r--r-- 1 root root   611 Mar 16  2016 auth-static.conf.ext
> >>     -rw-r--r-- 1 root root  2185 Mar 16  2016 auth-system.conf.ext
> >>     -rw-r--r-- 1 root root   330 Mar 16  2016 auth-vpopmail.conf.ext
> >>     [T] jeff@nantes-1:conf.d $ sudo service dovecot restart
> >>     Nov  3 16:14:26 nantes-1 dovecot: master: Warning: Killed with
> >>     signal 15 (by pid=5845 uid=0 code=kill)
> >>     Nov  3 16:14:26 nantes-1 dovecot: imap(jeff): Server shutting down.
> >>     in=3514 out=2605
> >>     Nov  3 16:14:26 nantes-1 dovecot: master: Dovecot v2.2.22 (fe789d2)
> >>     starting up for imap, sieve (core dumps disabled)
> >>     [T] jeff@nantes-1:conf.d $
> >>
> >> No errors there, either.
> >>
> >> And, just to be clear that I'm not missing anything:
> >>
> >>     ╭╴ (master=)╶╮
> >>     ╰ [T] jeff@nantes-1:p27 $ netstat -a | grep 242
> >>     ╭╴ (master=)╶╮
> >>     ╰ 1,[T] jeff@nantes-1:p27 $ doveconf -n | grep stat
> >>     ╭╴ (master=)╶╮
> >>     ╰ 1,[T] jeff@nantes-1:p27 $
> >>
> >> The file 91-stats contains the contents I pasted in my earlier mail.
> >> I'm a bit unclear what to check next.
> >>
> >> Jeff
> >>
> >>
> >> On 03/11/17 08:06, Steffen Kaiser wrote:
> >>> On Thu, 2 Nov 2017, Jeff Abrahamson wrote:
> >>>
> >>>> In particular, nothing listens on 24242.
> >>>>      service stats {
> >>>>        inet_listener {
> >>>>          address = 127.0.0.1
> >>>>          port = 24242
> >>>>        }
> >>>>      }
> >>> my conf looks almost identitical. This should do the trick, IMHO.
> >>>
> >>> check "doveconf -n" to see, if you have a typo somewhere or any errors
> >>> show up. Second check out the error log (there might be (re)bind
> >>> failures). Third, make sure you have restarted Dovecot.
> >>>
> >>> -- Steffen Kaiser
>

Don't know if it matters but you have two 'service stats {}' sections, one
for unix socket, one for tcp. Maybe move the inet_listener into the upper
one?
Reply | Threaded
Open this post in threaded view
|

Re: stats module

Jeff Abrahamson
On 03/11/17 17:43, Mark Moseley wrote:

>
>
> On Fri, Nov 3, 2017 at 9:35 AM, Jeff Abrahamson <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Sorry, Aki, I don't follow you.  Did I do it wrong in the file
>     91-stats
>     that I shared in my original mail (attached here)?
>
>     Jeff
>
>
>     On 03/11/17 16:50, Aki Tuomi wrote:
>     > You need to add the stats listener, by yourself.
>     >
>     > Aki
>     >
>     >> On November 3, 2017 at 5:19 PM Jeff Abrahamson <[hidden email]
>     <mailto:[hidden email]>> wrote:
>     >>
>     >>
>     >> Thanks for your suggestions, Steffen.
>     >>
>     >> Running doveconf -n shows no errors and also, sadly, no mention
>     of the
>     >> stats listener:
>     >>
>     >>     ╭╴ (master=)╶╮
>     >>     ╰ [T] jeff@nantes-1:p27 $ doveconf -n
>     >>     # 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
>     >>     # Pigeonhole version 0.4.13 (7b14904)
>     >>     # OS: Linux 4.4.0-97-generic x86_64 Ubuntu 16.04.3 LTS
>     >>     auth_mechanisms = plain login
>     >>     auth_socket_path = /var/run/dovecot/auth-userdb
>     >>     mail_location = maildir:~/Maildir
>     >>     managesieve_notify_capability = mailto
>     >>     managesieve_sieve_capability = fileinto reject envelope
>     >>     encoded-character vacation subaddress
>     comparator-i;ascii-numeric
>     >>     relational regex imap4flags copy include variables body enotify
>     >>     environment mailbox date index ihave duplicate mime
>     foreverypart
>     >>     extracttext
>     >>     namespace inbox {
>     >>       inbox = yes
>     >>       location =
>     >>       mailbox Drafts {
>     >>         special_use = \Drafts
>     >>       }
>     >>       mailbox Junk {
>     >>         special_use = \Junk
>     >>       }
>     >>       mailbox Sent {
>     >>         special_use = \Sent
>     >>       }
>     >>       mailbox "Sent Messages" {
>     >>         special_use = \Sent
>     >>       }
>     >>       mailbox Trash {
>     >>         special_use = \Trash
>     >>       }
>     >>       prefix =
>     >>     }
>     >>     passdb {
>     >>       driver = pam
>     >>     }
>     >>     plugin {
>     >>       sieve = ~/.dovecot.sieve
>     >>       sieve_dir = ~/sieve
>     >>     }
>     >>     protocols = imap sieve
>     >>     service auth {
>     >>       unix_listener /var/spool/postfix/private/auth {
>     >>         group = postfix
>     >>         mode = 0666
>     >>         user = postfix
>     >>       }
>     >>       unix_listener /var/spool/postfix/private/dovecot-auth {
>     >>         group = postfix
>     >>         mode = 0660
>     >>         user = postfix
>     >>       }
>     >>     }
>     >>     service imap-login {
>     >>       inet_listener imaps {
>     >>         port = 993
>     >>         ssl = yes
>     >>       }
>     >>     }
>     >>     ssl_cert = </etc/dovecot/dovecot.pem
>     >>     ssl_cipher_list =
>     >>   
>      EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
>     >>     ssl_key = </etc/dovecot/private/dovecot.pem
>     >>     ssl_protocols = !SSLv2 !SSLv3
>     >>     userdb {
>     >>       driver = passwd
>     >>     }
>     >>     protocol lda {
>     >>       deliver_log_format = msgid=%m: %$
>     >>       mail_plugins = sieve
>     >>       postmaster_address = postmaster
>     >>       quota_full_tempfail = yes
>     >>       rejection_reason = Your message to <%t> was automatically
>     >>     rejected:%n%r
>     >>     }
>     >>     protocol imap {
>     >>       imap_client_workarounds = delay-newmail
>     >>       mail_max_userip_connections = 20
>     >>     }
>     >>     protocol pop3 {
>     >>       mail_max_userip_connections = 10
>     >>       pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
>     >>     }
>     >>     ╭╴ (master=)╶╮
>     >>     ╰ [T] jeff@nantes-1:p27 $
>     >>
>     >> Here I have a tail -f /var/log/mail.log and mail.err running in the
>     >> background so we can see the results of the restart:
>     >>
>     >>     [T] jeff@nantes-1:conf.d $ ls -l
>     >>     total 136
>     >>     -rw-r--r-- 1 root root  5301 Aug 25 15:26 10-auth.conf
>     >>     -rw-r--r-- 1 root root  1893 Mar 16  2016 10-director.conf
>     >>     -rw-r--r-- 1 root root  2805 Mar 16  2016 10-logging.conf
>     >>     -rw-r--r-- 1 root root 16172 Aug 25 15:35 10-mail.conf
>     >>     -rw-r--r-- 1 root root  3547 Aug 25 15:40 10-master.conf
>     >>     -rw-r--r-- 1 root root  2307 Aug 25 16:27 10-ssl.conf
>     >>     -rw-r--r-- 1 root root   291 Apr 11  2017 10-tcpwrapper.conf
>     >>     -rw-r--r-- 1 root root  1668 Mar 16  2016 15-lda.conf
>     >>     -rw-r--r-- 1 root root  2808 Mar 16  2016 15-mailboxes.conf
>     >>     -rw-r--r-- 1 root root  3295 Mar 16  2016 20-imap.conf
>     >>     -rw-r--r-- 1 root root  2398 Apr 11  2017 20-managesieve.conf
>     >>     -rw-r--r-- 1 root root  4109 Aug 25 15:28 20-pop3.conf
>     >>     -rw-r--r-- 1 root root   676 Mar 16  2016 90-acl.conf
>     >>     -rw-r--r-- 1 root root   292 Mar 16  2016 90-plugin.conf
>     >>     -rw-r--r-- 1 root root  2502 Mar 16  2016 90-quota.conf
>     >>     -rw-r--r-- 1 root root  6822 Apr 11  2017 90-sieve.conf
>     >>     -rw-r--r-- 1 root root  1829 Apr 11  2017
>     90-sieve-extprograms.conf
>     >>     -rw-r--r-- 1 root root  1856 Nov  3 16:11 91-stats
>     >>     -rw-r--r-- 1 root root  1430 Oct 31 16:33
>     99-mail-stack-delivery.conf
>     >>     -rw-r--r-- 1 root root   499 Mar 16  2016
>     auth-checkpassword.conf.ext
>     >>     -rw-r--r-- 1 root root   489 Mar 16  2016 auth-deny.conf.ext
>     >>     -rw-r--r-- 1 root root   343 Mar 16  2016 auth-dict.conf.ext
>     >>     -rw-r--r-- 1 root root   561 Mar 16  2016 auth-master.conf.ext
>     >>     -rw-r--r-- 1 root root   515 Mar 16  2016
>     auth-passwdfile.conf.ext
>     >>     -rw-r--r-- 1 root root   788 Mar 16  2016 auth-sql.conf.ext
>     >>     -rw-r--r-- 1 root root   611 Mar 16  2016 auth-static.conf.ext
>     >>     -rw-r--r-- 1 root root  2185 Mar 16  2016 auth-system.conf.ext
>     >>     -rw-r--r-- 1 root root   330 Mar 16  2016
>     auth-vpopmail.conf.ext
>     >>     [T] jeff@nantes-1:conf.d $ sudo service dovecot restart
>     >>     Nov  3 16:14:26 nantes-1 dovecot: master: Warning: Killed with
>     >>     signal 15 (by pid=5845 uid=0 code=kill)
>     >>     Nov  3 16:14:26 nantes-1 dovecot: imap(jeff): Server
>     shutting down.
>     >>     in=3514 out=2605
>     >>     Nov  3 16:14:26 nantes-1 dovecot: master: Dovecot v2.2.22
>     (fe789d2)
>     >>     starting up for imap, sieve (core dumps disabled)
>     >>     [T] jeff@nantes-1:conf.d $
>     >>
>     >> No errors there, either.
>     >>
>     >> And, just to be clear that I'm not missing anything:
>     >>
>     >>     ╭╴ (master=)╶╮
>     >>     ╰ [T] jeff@nantes-1:p27 $ netstat -a | grep 242
>     >>     ╭╴ (master=)╶╮
>     >>     ╰ 1,[T] jeff@nantes-1:p27 $ doveconf -n | grep stat
>     >>     ╭╴ (master=)╶╮
>     >>     ╰ 1,[T] jeff@nantes-1:p27 $
>     >>
>     >> The file 91-stats contains the contents I pasted in my earlier
>     mail. 
>     >> I'm a bit unclear what to check next.
>     >>
>     >> Jeff
>     >>
>     >>
>     >> On 03/11/17 08:06, Steffen Kaiser wrote:
>     >>> On Thu, 2 Nov 2017, Jeff Abrahamson wrote:
>     >>>
>     >>>> In particular, nothing listens on 24242.
>     >>>>      service stats {
>     >>>>        inet_listener {
>     >>>>          address = 127.0.0.1
>     >>>>          port = 24242
>     >>>>        }
>     >>>>      }
>     >>> my conf looks almost identitical. This should do the trick, IMHO.
>     >>>
>     >>> check "doveconf -n" to see, if you have a typo somewhere or
>     any errors
>     >>> show up. Second check out the error log (there might be (re)bind
>     >>> failures). Third, make sure you have restarted Dovecot.
>     >>>
>     >>> -- Steffen Kaiser
>
>
> Don't know if it matters but you have two 'service stats {}' sections,
> one for unix socket, one for tcp. Maybe move the inet_listener into
> the upper one? 

Thanks.  I tried simply removing the socket listener, as I don't need
it.  Still no error, still no port 24242 listener.

--

Jeff Abrahamson
+33 6 24 40 01 57
+44 7920 594 255

http://p27.eu/jeff/
Reply | Threaded
Open this post in threaded view
|

Re: stats module

Thomas Leuxner
* Jeff Abrahamson <[hidden email]> 2017.11.03 17:45:

> >     >>     -rw-r--r-- 1 root root  1856 Nov  3 16:11 91-stats

Please take note of the include scheme:
!include conf.d/*.conf

Regards
Thomas

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: stats module

Steffen Kaiser-9
In reply to this post by Jeff Abrahamson
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Jeff Abrahamson wrote:
> On 03/11/17 17:43, Mark Moseley wrote:
>>
>>
>> On Fri, Nov 3, 2017 at 9:35 AM, Jeff Abrahamson <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Sorry, Aki, I don't follow you.  Did I do it wrong in the file
>> 91-stats that I shared in my original mail (attached here)?
>>

>>>> -rw-r--r-- 1 root root  1856 Nov  3 16:11 91-stats -rw-r--r--
>>>> 1 root root  1430 Oct 31 16:33
>> 99-mail-stack-delivery.conf

>>>> The file 91-stats contains the contents I pasted in my
>>>> earlier
>> mail.
>>>> I'm a bit unclear what to check next.

> Thanks.  I tried simply removing the socket listener, as I don't
> need it.  Still no error, still no port 24242 listener.

IMHO: the default dovecot.conf includes *.conf files only. If you
haven't changed it, hence, try to rename the file into

91-stats.conf
        ^^^^^

- --
Steffen
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQEcBAEBCgAGBQJZ/h3hAAoJEHz1H7kL/d9r1doIALrx38iwGoI4k7L6KYpS7IgS
1mdVDwuR05MoAUkkhHT+B9/wtYI4gdDaGS/R7m7pY/FB5dO2L9Y4tU6ZUSNB9rFJ
AqInuu43M/A9vc6/wAXPJIJfaduSE2Q5hrz2vfsjDBymFHmG9zh3dYjtvwo2Op92
iYPJP/2GZgHJGaAvPIckzzi2ICqbi/Ny1ODoyngWB5oLdFST1IerglNr88mUNxSO
F7TUPJYChQzOuvnxEPKUbWMgBw15SI+8MwSPeZl9twztbQ1Zzc/nXZlh2SB52PmA
LAWvUzbpAk1Khf57Mm4aiP7xrQMxIqWUTnkqXsDAGniH/QEX5koBBfNlc45cUjo=
=tFsf
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: stats module

Jeff Abrahamson
Doh.  Yes, that is why the file wasn't being read.  Thanks.

It turned out, moveover, that to get the inet listener to start, I
needed to do a restart, not just a reload (sudo service dovecot
reload).  I'm not sure why that should be.  But it's now working.


Meanwhile, I started seeing errors like this when I check mail:

    Nov  5 20:57:06 nantes-1 dovecot: imap(jeff): Error: stats:
open(/var/run/dovecot/stats-mail) failed: Permission denied

The comments on the wiki page tell me to make this socket mode 600 and
owned by the user that my mail process runs as.  I think this means
dovecot.  (I tried dovenull, that was wrong.)

    ╭╴ (master=)╶╮
    ╰ [T] jeff@nantes-1:p27 $ ll /var/run/dovecot/stats*
    srw------- 1 root    root 0 Nov  5 21:02 /var/run/dovecot/stats
    prw------- 1 dovecot root 0 Nov  5 21:02 /var/run/dovecot/stats-mail
    prw------- 1 root    root 0 Nov  5 21:02 /var/run/dovecot/stats-user
    ╭╴ (master=)╶╮
    ╰ [T] jeff@nantes-1:p27 $

But actually this might be tricky, since there are many such users,
depending on what we mean.

    root      7553  0.0  0.2  18244  3000 ?        Ss   Nov03   0:00
/usr/sbin/dovecot
    dovecot   7559  0.0  0.0   9520   960 ?        S    Nov03   0:00  \_
dovecot/anvil
    root     26686  0.0  0.2   9652  2376 ?        S    21:02   0:00  \_
dovecot/log
    root     26690  0.0  0.3  25300  4008 ?        S    21:02   0:00  \_
dovecot/config
    dovenull 26806  0.0  0.5  18820  5488 ?        S    21:02   0:00  \_
dovecot/imap-login
    root     26808  0.0  0.0   9516   948 ?        S    21:02   0:00  \_
dovecot/ssl-params
    jeff     26810  0.0  0.3  25852  3860 ?        S    21:02   0:00  \_
dovecot/imap

With a bit of trial-and-error, I see that the error goes away if I
change the owner to jeff.  It sounds like I need to create an imap-users
group and make the socket accessible to everyone in that group (mode
660).  But that's not really what the docs say.  Am I confused or is
this something I should suggest we change in the docs?

    https://wiki2.dovecot.org/Statistics

Jeff


On 04/11/17 21:06, Steffen wrote:
> Jeff Abrahamson wrote: > > On 03/11/17 17:43, Mark Moseley wrote: > >> > >> > >> On Fri, Nov
3, 2017 at 9:35 AM, Jeff Abrahamson <[hidden email] > >>
<mailto:[hidden email]>> wrote: > >> > >> Sorry, Aki, I don't follow you.
Did I do it wrong in the file > >> 91-stats that I shared in my original
mail (attached here)? > >> > > >>>> -rw-r--r-- 1 root root 1856 Nov 3
16:11 91-stats -rw-r--r-- > >>>> 1 root root 1430 Oct 31 16:33 > >>
99-mail-stack-delivery.conf > > >>>> The file 91-stats contains the
contents I pasted in my > >>>> earlier > >> mail. > >>>> I'm a bit
unclear what to check next. > > > Thanks. I tried simply removing the
socket listener, as I don't > > need it. Still no error, still no port
24242 listener. > > IMHO: the default dovecot.conf includes *.conf files
only. If you > haven't changed it, hence, try to rename the file into >
> 91-stats.conf > ^^^^^ >
--

Jeff Abrahamson
+33 6 24 40 01 57
+44 7920 594 255

http://p27.eu/jeff/

Reply | Threaded
Open this post in threaded view
|

Re: stats module

Aki Tuomi-2


On 05.11.2017 22:29, Jeff Abrahamson wrote:

> Doh.  Yes, that is why the file wasn't being read.  Thanks.
>
> It turned out, moveover, that to get the inet listener to start, I
> needed to do a restart, not just a reload (sudo service dovecot
> reload).  I'm not sure why that should be.  But it's now working.
>
>
> Meanwhile, I started seeing errors like this when I check mail:
>
>     Nov  5 20:57:06 nantes-1 dovecot: imap(jeff): Error: stats:
> open(/var/run/dovecot/stats-mail) failed: Permission denied
>
> The comments on the wiki page tell me to make this socket mode 600 and
> owned by the user that my mail process runs as.  I think this means
> dovecot.  (I tried dovenull, that was wrong.)
>
It means 'vmail', not 'dovecot'. If you are using real system users, you
probably need to set it as 0666.

Aki