Zabbix Documentation 4.2

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

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

Both sides previous revision Previous revision
Next revision
Previous revision
manual:config:items:userparameters:extending_agent [2014/09/30 12:54]
127.0.0.1 external edit
manual:config:items:userparameters:extending_agent [2018/10/01 09:42] (current)
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 [[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).