Skip to content

Commit c925200

Browse files
authored
osfv-scripts/osfv_cli/monitoring/zabbix: Update External_Check.md
1 parent 9d4aead commit c925200

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

osfv_cli/monitoring/zabbix/External_Check.md

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -17,65 +17,65 @@ You can find example scripts in this folder.
1717
> It's likely that the last used tab is overwriting session data.
1818
1919
## Create the item in Zabbix
20-
>
2120
> Item is a tool that gathers data from device, system or external script
22-
2. Navigate to **Configuration** > **Hosts**.
21+
1. Navigate to **Configuration** > **Hosts**.
2322
2. Go to the **Items** next to the host you want to monitor.
24-
2. Click **Create item** in top right.
25-
- Change Type to **External check**.
26-
- As key use your script name together with desired **Macro**, for example `script.sh[{HOST.IP}]`.
27-
+ You can combine multiple Macros `script.sh[{HOST.DESCRIPTION},{HOST.ID},{HOST.CONN}]`.
23+
3. Click **Create item** in top right.
24+
- Change Type to **External check**.
25+
- As key use your script name together with desired **Macro**, for example `script.sh[{HOST.IP}]`.
2826

29-
[list of macros](https://www.zabbix.com/documentation/current/en/manual/appendix/macros/supported_by_location#host-inventory)
27+
> [External Checks](https://www.zabbix.com/documentation/current/en/manual/config/items/itemtypes/external)
28+
29+
> [List of macros](https://www.zabbix.com/documentation/current/en/manual/appendix/macros/supported_by_location#host-inventory)
3030
3131
## Create the trigger
32-
>
3332
> Trigger is a rule that watches for specific events, like high CPU usage.
34-
3. Navigate to **Configuration** > **Hosts**.
35-
3. Go to the **Triggers** next to the host with the item you want to monitor.
33+
1. Navigate to **Configuration** > **Hosts**.
34+
2. Go to the **Triggers** next to the host with the item you want to monitor.
3635
3. Click **Create trigger** in top right.
37-
- Severity: Select as needed.
38-
- Expression: press Add
39-
+ Item: Select the item for which you want to create a trigger.
40-
+ Function: Defines how your trigger will be activated.
41-
+ Result: Actual rule of activation.
36+
- Severity: Select as needed.
37+
- Expression: press Add
38+
+ Item: Select the item for which you want to create a trigger.
39+
+ Function: Defines how your trigger will be activated.
40+
+ Result: Actual rule of activation.
4241
> If your script returns numeric values directly and/or you don't won't to calculate the average result, simply use `last()` function
4342
4443
## Testing
4544

46-
4. Test manually.
47-
- login as **zabbix** user and go to the script location.
48-
- run your script as zabbix.
45+
1. Test manually.
46+
- login as **zabbix** user and go to the script location.
47+
- run your script as zabbix.
4948
> You can directly incorporate information from Zabbix macros into your command, such as ./script.sh '192.168.10.0'.
5049
51-
4. Test in zabbix web interface.
52-
- Go to your item location.
53-
- If you are using external checks, **Test** option should be available.
54-
- Check if you Macros give proper data to your script.
55-
- Press **Get value and test**.
50+
2. Test in zabbix web interface.
51+
- Go to your item location.
52+
- If you are using external checks, **Test** option should be available.
53+
- Check if you Macros give proper data to your script.
54+
- Press **Get value and test**.
5655

57-
4. Common problems.
58-
- Timeout: you can change (not VM)Timeout(and TrapperTimeout if needed) settings in /etc/zabbix/zabbix_server.conf
59-
- Make sure all necesery files and commands are accessible for zabbix user.
60-
- If you find something else, please update the file.
56+
3. Common problems.
57+
- Timeout: you can change (not VM)Timeout(and TrapperTimeout if needed) settings in /etc/zabbix/zabbix_server.conf
58+
- Make sure all necesery files and commands are accessible for zabbix user.
59+
- If you find something else, please update the file.
6160

6261
## Templates
6362

64-
5. Navigate to **Configuration** > **Templates**.
65-
5. Click **Create template** in top right.
66-
- Specify the name, group and other information if needed.
67-
5. Add **items**, **trigger** and **macros** if needed.
68-
5. Link the template to **Hosts**
69-
5. Mass update
63+
1. Navigate to **Configuration** > **Templates**.
64+
2. Click **Create template** in top right.
65+
- Specify the name, group and other information if needed.
66+
3. Add **items**, **trigger** and **macros** if needed.
67+
4. Link the template to **Hosts**
68+
5. Mass update
7069
- Go to **Hosts**.
7170
- Check the boxes next to the desired hosts.
7271
- Scroll to the bottom and click **Mass update**.
73-
+ Select **Link templates**.
74-
+ Choose **Link**.
75-
+ Enter your template name.
76-
+ Press **Update**.
77-
78-
5. Single update
79-
+ Open desired **Host**.
80-
+ Add your Template under Templates.
81-
+ Press **Update**.
72+
+ Select **Link templates**.
73+
+ Choose **Link**.
74+
+ Enter your template name.
75+
+ Press **Update**.
76+
77+
6. Single update
78+
- Go to **Hosts**.
79+
+ Open desired **Host**.
80+
+ Add your Template under Templates.
81+
+ Press **Update**.

0 commit comments

Comments
 (0)