Qmail queue (<<<qmail_stats>>>) not working

Hi All,

I’m using v1.6.0p24 and I’m not able to manage with the “Qmail queue” alert.

If I execute local agent (/usr/bin/check_mk_agent) the correct section is in the output, es.:

messages in queue: 1
messages in queue but not yet preprocessed: 1

but if I run from check_mk Server

cmk -d |grep -i qmail_stats

no OUTPUT is returned.

Please, how can I debug more in depth?

I managed to solve the issue.
Environment PATH variable is different in xinet.d respect ssh session, it doesn’t load “/etc/profile” nor root .bash_profile. So the agent don’t know that qmail-qstats is under /var/qmail/bin path which is set in “/etc/profile”.
Possible solutions are:

  1. create a symlink of /var/qmail/bin/qmail-qstats under /usr/local/bin
  2. edit PATH variable into agent (/usr/bin/check_mk_agent) adding the path to your qmail-qstats

IMHO calling /var/qmail/bin/qmail-qstat in the agent would be a better solution: https://github.com/tribe29/checkmk/pull/394

Thanks, this solved my problem as well