https://github.com/gabrielrf/shell-zabbix-webscenario
Shell script that adds a Web Scenario and a Trigger on Zabbix
https://github.com/gabrielrf/shell-zabbix-webscenario
Last synced: 12 months ago
JSON representation
Shell script that adds a Web Scenario and a Trigger on Zabbix
- Host: GitHub
- URL: https://github.com/gabrielrf/shell-zabbix-webscenario
- Owner: GabrielRF
- License: gpl-2.0
- Created: 2015-05-13T13:20:43.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-06-23T13:24:49.000Z (almost 9 years ago)
- Last Synced: 2025-04-05T12:51:10.482Z (about 1 year ago)
- Language: Shell
- Size: 13.7 KB
- Stars: 6
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Shell-Zabbix-WebScenario
This shell script will create a web scenario on a specific host and a trigger to check if a website is available.
__You must have a host created before using this script!__
## Usage:
```
# chmod +x Shell-Zabbix-WebScenario.sh
$ ./Shell-Zabbix-WebScenario.sh 'web address' 'string' 'scenario/trigger name' 'hostid' 'hostname' 'username' 'password' 'api'
```
##### `web address`
Web page to be tested. Zabbix will check for http response `200` and a string, chosen below.
##### `string`
After checking for http responde `200`, Zabbix will look for this string on the web page.
##### `scenario/trigger name`
Scenario and trigger name.
##### `hostid`
Host ID that Zabbix add the Scenario and the Trigger. To find it, open your host on the Zabbix web interface and check its id on the URL.
For example:
`https://myzabbix.mydomain.com/hosts.php?form=update&hostid=12345&groupid=1`, the host id is `12345`.
##### `hostname`
Name of the host. Necessary to make the trigger work properly.
##### `username`
Zabbix user allowed to manage hosts
##### `password`
Zabbix user password
##### `api`
API location.
To check if you have the correct url, open it. You should see a black page.