Thursday, December 13, 2018

How to test a zabbix item key using zabbix_agentd in linux ?

zabbix_agentd - Zabbix agent daemon

      zabbix_agentd [-c config-file]
      zabbix_agentd [-c config-file] -p
      zabbix_agentd [-c config-file] -t item-key
      zabbix_agentd [-c config-file] -R runtime-option
      zabbix_agentd -h
      zabbix_agentd -V

      zabbix_agentd is a daemon for monitoring of various server parameters.

      -c, --config config-file
             Use the alternate config-file instead of the default one.  Absolute path should be specified.

      -f, --foreground
             Run Zabbix agent in foreground.

      -R, --runtime-control runtime-option
             Perform administrative functions according to runtime-option.

          Runtime control options
                  Increase log level, affects all processes if target is not specified

                  Decrease log level, affects all processes if target is not specified

          Log level control targets
              pid Process identifier

                  All processes of specified type (e.g., listener)

                  Process type and number (e.g., listener,3)

      -p, --print
             Print known items and exit.  

          d Number with a decimal part.

          m Not supported.  This could be caused by querying an item that only works
in the active mode like a log monitoring item or an item that requires multiple collected  values.
              Permission issues or incorrect user parameters could also result in the not supported state.

          s Text. Maximum length not limited.

          t Text. Same as s.

          u Unsigned integer.

      -t, --test item-key
             Test single item and exit.  See --print for output description.

      -h, --help
             Display this help and exit.

      -V, --version
             Output version information and exit.


How to test a item key using zabbix_agentd ?


zabbix_agentd -t  --test item-key

zabbix_agentd -t proc.mem[]
proc.mem[]                                    [u|3469561856]
 u give return data type from item was   Unsigned integer.

Proc.mem it give Memory used by process in bytes.

Above example it give all process total memory utilized in server .

zabbix_agentd -t system.hostname
system.hostname                               [s|]

Item returns data type was  s Text. Maximum length not limited.

How to find agent version ?

Syntax :

zabbix_agentd -V


zabbix_agentd -t agent.version


zabbix_agentd -V
zabbix_agentd (daemon) (Zabbix) 3.0.22
Revision 84876 14 September 2018, compilation time: Sep 14 2018 07:36:14

zabbix_agentd -t agent.version
agent.version                                 [s|3.0.22]

No comments:

Post a Comment