PDA

View Full Version : How do i collect UserParameter data?


morgolis
29-10-2004, 23:37
I am using this command: UserParameter=mailq,echo /var/spool/mail/* | wc -w to watch our Mail queue and it didn't barf when i started the zabbix_agentd daemon. Checked and i am seeing my 5 forked processes running. Question is, how do i collect the data from that to display it in a graph? :D

Alexei
30-10-2004, 13:35
Use mailq as an item's key. Nice graph will appear shortly :)

morgolis
02-11-2004, 01:46
Well i'm running zabbix_agentd for Solaris and i set the key up for Zabbix Agent for collection. Is this correct?

What i'm seeing on the graph is nearly a straight line.
Min: 7279 w/ Max: 7282

Now this doesn't seem right to me as it should vary a great deal more than this. Should this be set as a Zabbix Trapper item key?

*EDIT* Nope, definately NOT a Trapper item, was getting Null values returned

Cirrus
02-11-2004, 13:59
Maybe you should experiment with the "update interval" settings in the Items panel.
Did you try this?

I'm not that much into mail server management, but wouldn't it be more effective to use mailq command and then grep and count the first lines of every mail in the queue? (I'm using Postfix) This and the Update Interval set to a few seconds (10-15) would be something I would suggest.

Cheers!

morgolis
11-11-2004, 06:59
Ok been playing w/ the time and same meal deal. Doesn't vary too much from my other post. Course since i changed servers, i can't even see the map.

morgolis
03-12-2004, 02:41
I'm getting this error in my zabbix_suckerd.log file regarding mailq

008409:20041202:153945 Getting value of [mailq] from host [CA_Sun_Solaris] failed (ZBX_ERROR)
008409:20041202:153945 The value is not stored in database.

It appears that it's unable to retrieve the data from the Solaris mail server. Suggestions?

elings
10-05-2005, 17:00
Good work with Zabbix Alexei, please keep it up !


I have tried mailq as key on item, but i just get "Not supported by ZABBIX agent" so it doesn't work.
Should it be other type then ZABBIX agent, or what is wrong ?
I'm running 1.1alpha7

Nate Bell
10-05-2005, 17:57
Make sure you have added a UserParameter line to the monitored machine's zabbix_agentd.conf file (at the very bottom). mailq isn't a built in Zabbix key, but one that was defined by the initial poster (see first message). Don't forget to restart the agent once you have changed it's config file.

Nate

elings
12-05-2005, 10:46
OK, i didn't understand that. Now i just have permisson problems.The zabbix user can't run the mailq command... must be root or trusted user. I tried adding zabbix user to the trusted-user file in sendmail, but it didn't work either.

Thank you Nate !

johnl
12-05-2005, 11:12
best thing to do is create a cron job to run your script and then output the result to a file.tmp then mv this file to file.output and have zabbix monitor the file.ouput using a UserParamater of cat file.output.

i found out yesterday from Alexei that zabbix cant monitor the output file utilised by the cron job as the cron accessing this file temporarily sets the file to empty. see the post on "Ideas on how best to monitor Qmail stats" to get a better idea.

regards
john
.

elings
12-05-2005, 22:25
I have done so now, it works fine with only one problem.
In the error field on the mailq item, zabbix says "Not supported by ZABBIX agent"
But it still works...

Thanks for your help John !

elings
12-05-2005, 22:31
best thing to do is create a cron job to run your script and then output the result to a file.tmp then mv this file to file.output and have zabbix monitor the file.ouput using a UserParamater of cat file.output.

i found out yesterday from Alexei that zabbix cant monitor the output file utilised by the cron job as the cron accessing this file temporarily sets the file to empty. see the post on "Ideas on how best to monitor Qmail stats" to get a better idea.

regards
john
.

I have done so now, it works fine with only one problem.
In the error field on the mailq item, zabbix says "Not supported by ZABBIX agent"
But it still works...

Thanks for your help John !