Hello,
I've recently installed zabbix server and agent version-2.4.5 on a RedHat system (Red Hat Enterprise Linux Server release 6.5). This machine contains several filesystems.
I installed zabbix on one of them using installation from sources (./configure --prefix=/installation/directory, make, make install prefix=/installation/directory).
I have both of the server and agent working (showing green Z availability icon).
My problem is with user parameter, it doesn't work.
I added this one in the zabbix_agentd.conf file:
UserParameter=sortby.cpu,/bin/ps aux | /bin/sort -nk +3 | /usr/bin/tail | /usr/bin/tr -s " " | /bin/cut -d " " -f 3,11
(I had to specify the path for every command, because they are in different locations)
when I execute zabbix_get, I get Unsupported item key result:
/zabbix/bin> ./zabbix_get -s 172.17.15.169 -p 10050 -k sortby.cpu
ZBX_NOTSUPPORTED: Unsupported item key.
But when I execute this :
/zabbix/sbin> ./zabbix_agentd -t sortby.cpu
sortby.cpu [t|3.3 RTSDGN
3.5 java
3.5 RTSDGN
3.6 RTSDGN
3.7 /etc/alternatives/jre_1.7.0/bin/java
3.7 /etc/alternatives/jre_1.7.0/bin/java
5.2 /etc/alternatives/jre_1.7.0/bin/java
6.3 /etc/alternatives/jre_1.7.0/bin/java
9.0 /bin/ps
It gives a result.
I configured the item "sortby.cpu" on the zabbix frontend as following:
Name: sortby.cpu
Type: Zabbix agent
Key: sortby.cpu
Type of information: Text
Applications: General
Enabled: yes
I am confused now, why do I get Unsupported item key then ?
I've recently installed zabbix server and agent version-2.4.5 on a RedHat system (Red Hat Enterprise Linux Server release 6.5). This machine contains several filesystems.
I installed zabbix on one of them using installation from sources (./configure --prefix=/installation/directory, make, make install prefix=/installation/directory).
I have both of the server and agent working (showing green Z availability icon).
My problem is with user parameter, it doesn't work.
I added this one in the zabbix_agentd.conf file:
UserParameter=sortby.cpu,/bin/ps aux | /bin/sort -nk +3 | /usr/bin/tail | /usr/bin/tr -s " " | /bin/cut -d " " -f 3,11
(I had to specify the path for every command, because they are in different locations)
when I execute zabbix_get, I get Unsupported item key result:
/zabbix/bin> ./zabbix_get -s 172.17.15.169 -p 10050 -k sortby.cpu
ZBX_NOTSUPPORTED: Unsupported item key.
But when I execute this :
/zabbix/sbin> ./zabbix_agentd -t sortby.cpu
sortby.cpu [t|3.3 RTSDGN
3.5 java
3.5 RTSDGN
3.6 RTSDGN
3.7 /etc/alternatives/jre_1.7.0/bin/java
3.7 /etc/alternatives/jre_1.7.0/bin/java
5.2 /etc/alternatives/jre_1.7.0/bin/java
6.3 /etc/alternatives/jre_1.7.0/bin/java
9.0 /bin/ps
It gives a result.
I configured the item "sortby.cpu" on the zabbix frontend as following:
Name: sortby.cpu
Type: Zabbix agent
Key: sortby.cpu
Type of information: Text
Applications: General
Enabled: yes
I am confused now, why do I get Unsupported item key then ?
Comment