Hello,
I hope that someone can shed some light and maybe offer some suggestions.
I am trying to get the cpu load in a percentage format and I am able to do this via command line. The syntax is a little different for a single processor and a multiple processor and it does not round off (no big deal).
So I am testing my syntax in the UserParameter settings of the zabbix_agentd.conf file.
I am able to get the mysql.version to work, but I am not able to get the procload's to work (single.procload or multiple.procload), so I thought that I would try something simple and I added the w command just to test thiings out. Does anyone know how I can get the procloads to show up in zabbix. I created the configuration item to be a numeric float and multiplier to be set at 1.
Any suggestions would be greatly appreciated.
Sincerely,
Tim Rice
UserParameter=mysql.version,mysql -V
UserParameter=test.what,w
UserParameter=single.procload,expr 100 - `top -b -n 2 -d 1 | grep Cpu | tail -1 | awk '{print $8}' | sed -e 's/.%//g' | tr -d .`
UserParameter=multiple.procload,expr 100 - `top -Cb -n 2 -d 1 | grep -A 1 "CPU states" | tail -1 | awk '{print $8}' | sed -e 's/.%//g' | tr -d .`
I hope that someone can shed some light and maybe offer some suggestions.
I am trying to get the cpu load in a percentage format and I am able to do this via command line. The syntax is a little different for a single processor and a multiple processor and it does not round off (no big deal).
So I am testing my syntax in the UserParameter settings of the zabbix_agentd.conf file.
I am able to get the mysql.version to work, but I am not able to get the procload's to work (single.procload or multiple.procload), so I thought that I would try something simple and I added the w command just to test thiings out. Does anyone know how I can get the procloads to show up in zabbix. I created the configuration item to be a numeric float and multiplier to be set at 1.
Any suggestions would be greatly appreciated.
Sincerely,
Tim Rice
UserParameter=mysql.version,mysql -V
UserParameter=test.what,w
UserParameter=single.procload,expr 100 - `top -b -n 2 -d 1 | grep Cpu | tail -1 | awk '{print $8}' | sed -e 's/.%//g' | tr -d .`
UserParameter=multiple.procload,expr 100 - `top -Cb -n 2 -d 1 | grep -A 1 "CPU states" | tail -1 | awk '{print $8}' | sed -e 's/.%//g' | tr -d .`
Comment