Skip to content

User-Defined Parameters

Video Lecture

UserParameters UserParameters

 (Pay Per View)

You can use PayPal to purchase a one time viewing of this video for $1.49 USD.

Pay Per View Terms

  • One viewing session of this video will cost the equivalent of $1.49 USD in your currency.
  • After successful purchase, the video will automatically start playing.
  • You can pause, replay and go fullscreen as many times as needed in one single session for up to an hour.
  • Do not refresh the browser since it will invalidate the session.
  • If you want longer-term access to all videos, consider purchasing full access through Udemy or YouTube Memberships instead.
  • This Pay Per View option does not permit downloading this video for later viewing or sharing.
  • All videos are Copyright © 2019-2025 Sean Bradley, all rights reserved.

Description

I create several examples of user-defined parameters in Zabbix.

Example 1

Starting as simple as possible.

I create an item to check isalive

Inside the Zabbix agent configuration file, on the host that will run the user parameter, I add,

UserParameter=isalive,echo 1

I save it, then I test it using,

zabbix_agentd -t isalive

I then restart the Zabbix agent process,

sudo service zabbix-agent restart

I then add a new item to my host with

Property Value
Name Is Alive
Key isalive
Type of information Numeric (unsigned)

I go to Monitoring ⇾ Latest Data and wait for it to appear.

Example 2

And now for something a bit more complicated, and that is Flexible User Parameters.

Inside the configuration file I add,

UserParameter=isalive[*],echo $1

I can test it using

zabbix_agentd -t isalive[123]

Restart the Zabbix agent process,

sudo service zabbix-agent restart

The item inside Zabbix Server has,

Property Value
Name Is Alive
Key isalive[123456]
Type of information text

Example 3

And now, I convert an existing system.run command to a user parameter.

The script called in this system.run command is outlined in lecture Check SSL Certificate Expiry on Websites using Custom Script and system.run

Inside the configuration file I add,

UserParameter=checkssl[*],/home/zabbix/checkssl.sh $1 $2

I can test it using

zabbix_agentd -t checkssl[example.com,443]

Restart the Zabbix agent process,

sudo service zabbix-agent restart

The item inside Zabbix Server has,

Property Value
Name Check SSL example.com
Key checkssl[example.com,443]
Type of information Numeric (unsigned)

User Parameters