Ad Widget

Collapse

monitoring of msg count in spool

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fresh
    Junior Member
    • Sep 2006
    • 4

    #1

    monitoring of msg count in spool

    Hi!
    I havw smtp server and want to know how many messages are in spool
    How can i get this info?

    Or how can a get layout of some cmd as value in zabbix?
  • Calimero
    Senior Member
    • Nov 2006
    • 481

    #2
    Zabbix agent can execute arbitrary commands and collect their output.
    For example, put this in your agent configuration file:

    UserParameter=num_files[*],ls -A $1 | wc -l

    Then, on your Zabbix server, create a new item, with:
    key = num_files[/var/spool/mail]
    Type = numeric

    You could of course write a script which would output how many files you have in spool:

    UserParameter=spool_size,/usr/local/zabbix/bin/checks/spool_size.sh

    You can achieve similar functionality with SNMPD if you don't want/cannot use Zabbix agent.

    Comment

    • fresh
      Junior Member
      • Sep 2006
      • 4

      #3
      Originally posted by Calimero
      Zabbix agent can execute arbitrary commands and collect their output.
      For example, put this in your agent configuration file:

      UserParameter=num_files[*],ls -A $1 | wc -l

      Then, on your Zabbix server, create a new item, with:
      key = num_files[/var/spool/mail]
      Type = numeric

      You could of course write a script which would output how many files you have in spool:

      UserParameter=spool_size,/usr/local/zabbix/bin/checks/spool_size.sh

      You can achieve similar functionality with SNMPD if you don't want/cannot use Zabbix agent.
      I`ll try to use `exim -bpc`. It will bee just fine... i hope. 10x

      Comment

      Working...