Good morning Zabbix Users,
I'm creating (should be) first Zabbix Template for monitoring TrueNas with Api function but I have some problems.
the Github link i'll post when the first release is ready.
My idea is to create an item / trigger for each alert that is not "dismissed" in order to monitor all my Truenas.
Given the notification I connect to the freenas I check what I have to do, and set notification to dismissed true so zabbix at the next check will delete item / trigger
Example of api output
[
{
"uuid": "3317bc69-355d-459b-8521-3c321d928927",
"source": "ReportingDb",
"klass": "ReportingDb",
"args": {
"used": "1.65 GiB",
"threshold": "1.05 GiB"
},
"node": "Controller A",
"key": "null",
"datetime": {
"$date": 1625827858961
},
"last_occurrence": {
"$date": 1660745619351
},
"dismissed": true,
"mail": null,
"text": "Reporting database used size %(used)s is larger than %(threshold)s.",
"id": "3317bc69-355d-459b-8521-3c321d928927",
"level": "WARNING",
"formatted": "Reporting database used size 1.65 GiB is larger than 1.05 GiB.",
"one_shot": false
},
{
"uuid": "9721e6ec-ed6c-449b-a0a7-efaac3461eeb",
"source": "",
"klass": "UPSReplbatt",
"args": {
"ups": "ups"
},
"node": "Controller A",
"key": "{"ups": "ups"}",
"datetime": {
"$date": 1660727945477
},
"last_occurrence": {
"$date": 1660727945477
},
"dismissed": false,
"mail": null,
"text": "UPS %(ups)s Battery needs replacement.",
"id": "9721e6ec-ed6c-449b-a0a7-efaac3461eeb",
"level": "CRITICAL",
"formatted": "UPS ups Battery needs replacement.",
"one_shot": false
}
]
with this Item I'll retrive one array of alerts (both bismissed true and false)

with this "item prototipe" i create one item for each notifications presente in TrueNas

Problem:
1: how to create item only for alter with dismissed = false:
2) for each created item in "value filed" i see all entire json content
I'm creating (should be) first Zabbix Template for monitoring TrueNas with Api function but I have some problems.
the Github link i'll post when the first release is ready.
My idea is to create an item / trigger for each alert that is not "dismissed" in order to monitor all my Truenas.
Given the notification I connect to the freenas I check what I have to do, and set notification to dismissed true so zabbix at the next check will delete item / trigger
Example of api output
[
{
"uuid": "3317bc69-355d-459b-8521-3c321d928927",
"source": "ReportingDb",
"klass": "ReportingDb",
"args": {
"used": "1.65 GiB",
"threshold": "1.05 GiB"
},
"node": "Controller A",
"key": "null",
"datetime": {
"$date": 1625827858961
},
"last_occurrence": {
"$date": 1660745619351
},
"dismissed": true,
"mail": null,
"text": "Reporting database used size %(used)s is larger than %(threshold)s.",
"id": "3317bc69-355d-459b-8521-3c321d928927",
"level": "WARNING",
"formatted": "Reporting database used size 1.65 GiB is larger than 1.05 GiB.",
"one_shot": false
},
{
"uuid": "9721e6ec-ed6c-449b-a0a7-efaac3461eeb",
"source": "",
"klass": "UPSReplbatt",
"args": {
"ups": "ups"
},
"node": "Controller A",
"key": "{"ups": "ups"}",
"datetime": {
"$date": 1660727945477
},
"last_occurrence": {
"$date": 1660727945477
},
"dismissed": false,
"mail": null,
"text": "UPS %(ups)s Battery needs replacement.",
"id": "9721e6ec-ed6c-449b-a0a7-efaac3461eeb",
"level": "CRITICAL",
"formatted": "UPS ups Battery needs replacement.",
"one_shot": false
}
]
with this Item I'll retrive one array of alerts (both bismissed true and false)
with this "item prototipe" i create one item for each notifications presente in TrueNas
Problem:
1: how to create item only for alter with dismissed = false:
2) for each created item in "value filed" i see all entire json content