Saturday, February 10, 2018

How to test if your zabbix server receive data from zabbix client or not?



you have installed zabbix agent on your server. Process zabbix client is up and running but does zabbix server start to receive data from it?

Simplest way to this is to connect to your zabbix server and initiate zabbix_get command! With this command can get to see data from zabbix client.

 zabbix_get - Zabbix get utility.

Syntax:

ram@zabbixserver:~$  zabbix_get -s IP_ZABBIX_CLIENT -k ZABBIX_ITEM


Where  -s, --host <host name or IP>
              Specify host name or IP address of a host.

             -k, --key <item key>
              Specify key of item to retrieve value for.

Test the connection between zabbix_server to client.

ram@zabbixserver:~$ zabbix_get -s 192.168.101.26 -k agent.ping
1

If u get output 1 means connection is ok and data is received from 192.168.101.26

ram@zabbixserver:~$ zabbix_get -s 192.168.101.26 -k agent.ping

zabbix_get [31561]: Get value error: cannot connect to [[192.168.101.26 ]:10050]: [111] Connection refused

server 192.168.101.26 but zabbix agent is not installed, not running or firewall is blocking or network problem !!

How to check agent version from zabbix server ?

Using zabbix_get command u can easily get agent version.


ram@zabbixserver:~$zabbix_get -s 192.168.101.26 -k agent.version
3.0.6

Get any information from client host without login to host server using zabbix_get command for example load average.

ram@zabbixserver:~$zabbix_get -s 192.168.101.26 -k "system.cpu.load[all,avg5]"
0.410000


No comments:

Post a Comment