This template for Zabbix Monitoring template.
- Copy website_metrics.py on your server to ExternalScripts folder (/usr/lib/zabbix/externalscripts/ for default) and grant it executable: chmod 755 website_metrics.py
- Copy website_settings.example.py to ExternalScripts folder (/usr/lib/zabbix/externalscripts/ for default) and rename in to. Make proper changes on it.
- Install python and pip if required. For Ubuntu 18.04: apt install python-pip
- Install Python module: pip install -r requirements.txt
- Import the template XML file using the Zabbix Templates Import feature for your version of installation.
- Create Host.
- Link Template Website metrics to host.
- Override in host macros:
{$WEBSITE_METRICS_URL} - full URL for check availability
{$WEBSITE_METRICS_PHRASE} - phrase, which Zabbix will be monitoring
{$WEBSITE_METRICS_DEBUG} - turn on debug information while script executing
{$WEBSITE_METRICS_TIMEOUT} - timeout in seconds for web site check
{$WEBSITE_METRICS_TIMEOUT_RECOVERY} - timeout in seconds for recovery