I have been trying to configure Zabbix to monitor my mail server which is on a Fedora Core installation.
I have seen lots of posts from users with what they have tried but I cannot seem to get anything to work correctly.
Here is some of the things I have tried:
This always return 0-
UserParameter=mail.queue_count,mailq|grep "Total"|cut -f3 -d" "
The below commands should if they worked return the number of files in the mail queue times 2 which can be corrected by a .5 multiplier.
This always returns 0-
UserParameter=mail.queue_count,ls /var/spool/mqueue/ | wc -w
This one always returns 1-
UserParameter=mail.queue_count,echo /var/spool/mqueue/* | wc -w
The below command always returns 'Not Supported'-
UserParameter=mail.queue_size,ls -lA /var/spool/mqueue | grep "total" | cut -f2 -d" "
Now if I su to the zabbix user and run these commands at the console, I get the correct output. Note: I had to add the zabbix user to the mail in order to read the /var/spool/mqueue directory.
Has anyone had luck with trying to monitor their mail queue and size parameters?
Thanks
I have seen lots of posts from users with what they have tried but I cannot seem to get anything to work correctly.
Here is some of the things I have tried:
This always return 0-
UserParameter=mail.queue_count,mailq|grep "Total"|cut -f3 -d" "
The below commands should if they worked return the number of files in the mail queue times 2 which can be corrected by a .5 multiplier.
This always returns 0-
UserParameter=mail.queue_count,ls /var/spool/mqueue/ | wc -w
This one always returns 1-
UserParameter=mail.queue_count,echo /var/spool/mqueue/* | wc -w
The below command always returns 'Not Supported'-
UserParameter=mail.queue_size,ls -lA /var/spool/mqueue | grep "total" | cut -f2 -d" "
Now if I su to the zabbix user and run these commands at the console, I get the correct output. Note: I had to add the zabbix user to the mail in order to read the /var/spool/mqueue directory.
Has anyone had luck with trying to monitor their mail queue and size parameters?
Thanks
Comment