Zabbix Agent Userparameter Example
UserParametermailqueuemailq grep -c 0-9A-F Restart the agent and query it with zabbix_get as before it will return the number of the messages in the queue. Inside the zabbix agent configuration file on the host that will run the UserParameter I add UserParameterisaliveecho 1.
Monitor Everything Extending Windows And Linux Agents With Scripts Sudo Null It News
Every command is written as a function to be used as user parameters for Zabbix to query.
Zabbix agent userparameter example. The agent will always return 1 for an item with ping key. We can execute powershell commands on remote hosts with Zabbix agent. The agent will return 1 if MySQL server is alive 0 - otherwise.
The userparameter in your Zabbix agent configuration file zabbix_agentdconf should be something like this. UserParametermysqlpingmysqladmin -uroot ping grep -c alive. Add the command to zabbix_agentdconf.
The computer running Windows must have the Zabbix agent installed. Here is my example. UserParametermysqlquestionsmysqladmin -uroot status cut -f4 -d cut -f1 -dS mysqlquestions is a unique identifier.
Tutorial - Zabbix UserParameter. Zabbix conf zabbix_agentd userparameter_examplesconf Rihards Olups authored fe3094338cf 04 Jan 2014 Git repository management for enterprise teams. The agent will return 1 if MySQL server is alive 0 - otherwise.
Here is an example of counting the number of active processes Element type is Zabbix agent so I often count the number of processes nginx apache2 sshd named radiusd etc and for a value of 0 you can make a trigger that the process does not work. With this knowledge in hand we can add a new userparameter in the agent daemon configuration file. Zabbix_get -s 1921680150 -p 10050 -k computerlinuxusercount 33 In our example the Linux computer running the Zabbix agent is using the IP address.
Modify the server line and add the ip address of the Zabbix server that will monitor this agent. Two of the scripts will be used as host items and the other will be an administration script that we can call manually. Create a folder Czabbix-agent-scripts.
The zabbix_agent_server and zabbix_agent_serveractive should contain the ip or fqdn of the host running the Zabbix Server. Create a new item for the host from where you want to ping from in zabbix. User Parameters in Zabbix.
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. More complex example UserParametermysqlpingmysqladmin -uroot ping grep -c alive. In our example the Zabbix agent is configured to allow the connection from the Zabbix server 200200200200.
A more complex example. UserParametercustomdiscoveryhbapathspowershell -File CProgram FilesZabbix AgentGet-HBAPathNumbersForDiscoveryps1 Copy lines Copy permalink. I create an item to check isalive.
Restart the windows agent. The Localhost 127001 is allowed to request and receive information from the agent. As you can see The Zabbix server is able to remotely get this information from the Agent.
Would you like to learn how to use Zabbix Userparameter feature. Starting as simple as possible. Put the desired userparameter file in the templatesuserparameters directory and name it as j2.
PingCheck10001. It can be any valid key identifier for example queries. 3412 Windows version.
In this tutorial we are going to show you how to configure Zabbix Userparameter and create a custom script to monitor a computer running Windows. UserParameterHostInventory_ PowerShellexe -nologo -command. Server664524098 ServerActive664524098 modify the hostname line and set it to match the name of your server.
The Zabbix server with the IP address 200200200200 is allowed to request and receive information from this agent. In this lesson we will install 3 scripts that we can use to query Windows Updates status on a remote windows host. I create several examples of UserParameters in this video.
Zabbix Simple File Count For Linux My Little Farm
Tutorial Zabbix Userparameter Script On Linux
Create A Custom Metric In Zabbix To The New Blog
Zabbix Agent User Parameters Zabbix Blog
Userparameter Permission Denied Zabbix
Userparameters Multiple Items Zabbix Forums
Zabbix Agent User Parameters Zabbix Blog
Zabbix Agent User Parameters Zabbix Blog
Tutorial Zabbix Userparameter Script On Windows
Zabbix Agent User Parameters Zabbix Blog
Install Zabbix On Pfsense Karim S Blog
Monitor Unifi Controller Values Using Zabbix Server And Custom Templates Page 2 Of 4 Lab Eighty Four
Tutorial Zabbix Userparameter Script On Linux
Zabbix Agent User Parameters Zabbix Blog
Zabbix Agent User Parameters Zabbix Blog
Zabbix Linux Vfs User Parameter Templates My Little Farm
Create A Custom Metric In Zabbix To The New Blog
Zabbix Agent User Parameters Zabbix Blog
Values Of User Parameter Item Key Zabbix Forums
Post a Comment for "Zabbix Agent Userparameter Example"