Hi,
First of all, I apologize for the bad English.
I would like to solve the following problem:
Let's have Zabbix Server version 5.0.3.
Next, let's have a Turris Omnia router. Zabbix Agent version 4.0.16 is installed on it.
After running the "sensors -j" command, Turris Omnia returns a list of temperature sensors and their values in the following JSON form:
I would like create a Discovery rule that, based on the discovered temperature sensors, creates Items whose:
After carefully reading the official documentation, I still do not understand how I can achieve the desired goal.
I have created a template for Turris Omnia with the following Discovery rule:
I also created an Item prototype with attributes:
What's wrong, please, that no items are being created?
Thank you very much for your help.
First of all, I apologize for the bad English.
I would like to solve the following problem:
Let's have Zabbix Server version 5.0.3.
Next, let's have a Turris Omnia router. Zabbix Agent version 4.0.16 is installed on it.
After running the "sensors -j" command, Turris Omnia returns a list of temperature sensors and their values in the following JSON form:
Code:
{
"mv88e6xxx102-mdio-2":{
"Adapter": "MDIO adapter",
"temp1":{
"temp1_input": 49.000,
"temp1_crit": 100.000,
"temp1_max_alarm": 0.000
}
},
"mv88e6xxx100-mdio-0":{
"Adapter": "MDIO adapter",
"temp1":{
"temp1_input": 49.000,
"temp1_crit": 100.000,
"temp1_max_alarm": 0.000
}
},
"f1072004mdiomii01-mdio-1":{
"Adapter": "MDIO adapter",
"temp1":{
"temp1_input": 41.000,
"temp1_crit": 100.000,
"temp1_max_alarm": 0.000
}
},
"mv88e6xxx103-mdio-3":{
"Adapter": "MDIO adapter",
"temp1":{
"temp1_input": 49.000,
"temp1_crit": 100.000,
"temp1_max_alarm": 0.000
}
},
"mv88e6xxx101-mdio-1":{
"Adapter": "MDIO adapter",
"temp1":{
"temp1_input": 49.000,
"temp1_crit": 100.000,
"temp1_max_alarm": 0.000
}
},
"armada_thermal-virtual-0":{
"Adapter": "Virtual device",
"temp1":{
"temp1_input": 72.261
}
},
"mv88e6xxx104-mdio-4":{
"Adapter": "MDIO adapter",
"temp1":{
"temp1_input": 49.000,
"temp1_crit": 100.000,
"temp1_max_alarm": 0.000
}
}
}
I would like create a Discovery rule that, based on the discovered temperature sensors, creates Items whose:
- The names will correspond to the names of the temperature sensors (mv88e6xxx102-mdio-2, armada_thermal-virtual-0,...),
- The values will correspond to the temperatures from the given sensors (49.000, 72.261,...).
After carefully reading the official documentation, I still do not understand how I can achieve the desired goal.
I have created a template for Turris Omnia with the following Discovery rule:
- Name: Turris Omnia Sensors
- Type: Zabbix agent (in the file "zabbix_agentd.conf" I have the line "UserParameter=sensors
- ,sensors $1")
- Key: sensors[-j]
- LLD macro {#SENSOR_NAME} ... JSONPath "$.*~" (without quotes)
- LLD macro {#SENSOR_TEMP} ... JSONPath "$.
- .['Temp1'].['Temp1_input']" (without quotes)
I also created an Item prototype with attributes:
- Name: Sensor {#SENSOR_NAME}
- Type: Zabbix agent
- Key: sensors[{#SENSOR_NAME},{#SENSOR_TEMP}]
- Type of information: Numeric (float)
- Applications: Sensors
- Applications prototypes: Sensor {#SENSOR_NAME}
What's wrong, please, that no items are being created?
Thank you very much for your help.
Comment