Trying to calculate the disk usage in percentage by using javascript preprocessing. But there's insufficient documentation, so I'll try asking here.
I have followed the first steps of this "guide" (mostly useless): https://www.zabbix.com/documentation...snmp_oids_walk
1. In a template, create an snmp agent item with oid "walk[1.2.3]"
2. Make a discovery rule that use the item in step1 as a dependent item. Use preprocessing step "SNMP walk to JSON" to break down the dependent snmp-walk into macros.
3. Create item prototypes by using the macros from the preprocessing step from the discovery rule.
Now to the problem:
I'm usng "SNMP walk to JSON" in the preprocessing step of the item prototype (which is using the original snmp-walk as depending item) like so:
OID prefix: 1.2.3.4.{#SNMPINDEX} --> Macro {$DISKUSAGE}
OID prefix: 1.2.3.6.{#SNMPINDEX} --> Macro {$DISKSIZE}
I then use these macros in javascript in the next preprocessing steps.
The SNMP walk to JSON fails with "no data found".
The OIDs in that step in the instantiated items do exist, and return values when I snmpget or snmp-walk them.
How do I grab the values of that walk and use them in a formula?
Where do I find ACTUAL and useful documentation on how to do these things? I understand that zabbix wants to sell support, but I personally find this beyond unethical.
I have followed the first steps of this "guide" (mostly useless): https://www.zabbix.com/documentation...snmp_oids_walk
1. In a template, create an snmp agent item with oid "walk[1.2.3]"
2. Make a discovery rule that use the item in step1 as a dependent item. Use preprocessing step "SNMP walk to JSON" to break down the dependent snmp-walk into macros.
3. Create item prototypes by using the macros from the preprocessing step from the discovery rule.
Now to the problem:
I'm usng "SNMP walk to JSON" in the preprocessing step of the item prototype (which is using the original snmp-walk as depending item) like so:
OID prefix: 1.2.3.4.{#SNMPINDEX} --> Macro {$DISKUSAGE}
OID prefix: 1.2.3.6.{#SNMPINDEX} --> Macro {$DISKSIZE}
I then use these macros in javascript in the next preprocessing steps.
The SNMP walk to JSON fails with "no data found".
The OIDs in that step in the instantiated items do exist, and return values when I snmpget or snmp-walk them.
How do I grab the values of that walk and use them in a formula?
Where do I find ACTUAL and useful documentation on how to do these things? I understand that zabbix wants to sell support, but I personally find this beyond unethical.
Comment