Zabbix Documentation 3.2

3.04.04.24.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.4Guidelines

User Tools

Site Tools


manual:config:items:userparameters:extending_agent

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
manual:config:items:userparameters:extending_agent [2014/09/25 14:42]
sasha Page moved from 2.4:manual:config:items:userparameters:extending_agent to manual:config:items:userparameters:extending_agent
manual:config:items:userparameters:extending_agent [2016/02/16 15:25] (current)
Line 1: Line 1:
 ==== 1 Extending Zabbix agents ==== ==== 1 Extending Zabbix agents ====
  
-This tutorial provides step-by-step instructions on how to extend the functionality of Zabbix agent with the use of a [[:2.4/manual/config/items/userparameters|user parameter]].+This tutorial provides step-by-step instructions on how to extend the functionality of Zabbix agent with the use of a [[manual:config:items:userparameters|user parameter]].
  
 == Step 1 == == Step 1 ==
Line 9: Line 9:
 For example, we may write the following command in order to get total number of queries executed by a MySQL server: For example, we may write the following command in order to get total number of queries executed by a MySQL server:
  
-  mysqladmin -uroot status|cut -f4 -d":"​|cut -f1 -d"​S"​+  mysqladmin -uroot status | cut -f4 -d":"​ | cut -f1 -d"​S"​
  
 When executed, the command returns total number of SQL queries. When executed, the command returns total number of SQL queries.
  
 == Step 2 == == Step 2 ==
- 
-Add this command to agent'​s configuration file. 
  
 Add the command to zabbix_agentd.conf:​ Add the command to zabbix_agentd.conf:​
  
-  UserParameter=mysql.questions,​mysqladmin -uroot status|cut -f4 -d":"​|cut -f1 -d"​S"​+  UserParameter=mysql.questions,​mysqladmin -uroot status | cut -f4 -d":"​ | cut -f1 -d"​S"​
  
-**mysql.questions** is an unique identifier. It can be any string, for example, queries.+**mysql.questions** is unique identifier. It can be any valid key identifier, for example, ​//queries//.
  
-Test this parameter by using [[:2.4/​manual/​concepts/​get|zabbix_get]] utility.+Test this parameter by using Zabbix agent with "​-t"​ flag (if running under root, however, note that the agent may have different permissions when launched as a daemon): 
 + 
 +  zabbix_agentd -t mysql.questions
  
 == Step 3 == == Step 3 ==
Line 31: Line 31:
 Agent will reload configuration file. Agent will reload configuration file.
  
-== Step 4 ==+Test this parameter by using [[manual:​concepts:​get|zabbix_get]] utility.
  
-Add new item for monitoring.+== Step 4 ==
  
 Add new item with Key=mysql.questions to the monitored host. Type of the item must be either Zabbix Agent or Zabbix Agent (active). Add new item with Key=mysql.questions to the monitored host. Type of the item must be either Zabbix Agent or Zabbix Agent (active).