Found some bugs:
1. monitors.json and monitor/<id>.json use incorrect Id (monitor Id instead of ManufacturerId) to return Manufacturer and CameraModel:
Code: Select all
/usr/bin/curl -sS --noproxy localhost http://localhost/zm/api/monitors/3.json | jq .
{
"monitor": {
"Monitor": {
"Id": "3",
"Name": "third",
"Notes": "",
"ServerId": "0",
"StorageId": "3",
"ManufacturerId": "12",
"ModelId": "27",
"Type": "Ffmpeg",
------------- cut -------------------
},
"Monitor_Status": {
"MonitorId": "3",
"Status": "Connected",
"CaptureFPS": "25.00",
"AnalysisFPS": "0.00",
"CaptureBandwidth": "194361"
},
"Event_Summary": {
"MonitorId": "3",
"TotalEvents": "2097",
"TotalEventDiskSpace": "238373534279",
"HourEvents": "11",
"HourEventDiskSpace": "0",
"DayEvents": "169",
"DayEventDiskSpace": "3466844284",
"WeekEvents": "883",
"WeekEventDiskSpace": "79973436275",
"MonthEvents": "2097",
"MonthEventDiskSpace": "238373534279",
"ArchivedEvents": "0",
"ArchivedEventDiskSpace": "0"
},
"Manufacturer": {
"Id": "3",
"Name": "Airlink101"
},
"CameraModel": {
"Id": "3",
"Name": "A24",
"ManufacturerId": "1"
}
}
}
Code: Select all
{
"usage": {
"pin": {
"space": "0",
"color": "#2615b6"
},
"forche": {
"space": "3.814697265625E-6",
"color": "#42b147"
},
"third": {
"space": "3.814697265625E-6",
"color": "#5eb348"
"top_1": {
"space": "3.814697265625E-6",
"color": "#11fa51"
},
"top_2": {
"space": "3.814697265625E-6",
"color": "#dc9f57"
},
"counter": {
"space": "3.814697265625E-6",
"color": "#6e35ed"
},
"upper": {
"space": "0",
"color": "#44e284"
},
"vily": {
"space": "0",
"color": "#514082"
},
"Total": {
"space": "102.70781326294",
"color": "#F7464A"
}
}
}
Since Zabbix is a monitoring system, I don't need to fetch all static info like monitor setting every minute (which is what I have to do now). It wold be great choice to be able get only volatile data, especially Monitor_Status (for current Status and Bandwidth) and Event_Summary . Is that possible?
Thanks is advance!