Всем привет! очень нужна помощь, сразу говорю, в стандартном темплейте по мониторингу hikvision нет такого отслеживания по статусу online именно с регистратора
Проблема такая, получаю данные с регистратора hikvision через zabbix и мне нужно выловить поле true и как на основе этого поля сделать аллерт, если поле true то все ок если <online>false</online> то не ок
но так же мне нужно в разных случаях обрабатывать не все поля.
есть где в регистратор вставлено 3 камеры из восьми и мне нужно ок только с трех камер, остальные порты отслеживать не нужно.
вот данные которые получаю по ISAPI:
запрос: http://ipадресс/ISAPI/ContentMgmt/In...hannels/status
Ответ: (для удобства выделил строки online)
{"InputProxyChannelStatusList":{"@version":"1.0 "," InputProxyChannelStatus":[{"@version":"1.0","id":"1","sourceInputPortDesc rip tor":{"proxyProtocol":"HIKVISION","addressingForm a tType":"ipaddress","ipAddress":"192.168.254.2","ma nagePortNo":"8000","srcInputPort":"1","userName":" admin","connMode":"plugplay","streamType":"auto"," deviceID":null},"online":"true","streamingProxyCha nnelIdList":{"streamingProxyChannelId":"101"},"rel atedIOProxy":{"inputProxyPortIdList":{"inputProxyP ortId":"I-101"},"outputProxyPortIdList":{"outputProxyPortId " :"O-101"}},"chanDetectResult":"connect","url":"http://192.168.1.74:65001","SecurityStatus":{"PasswordSta tus":"invalid"}},{"@version":"1.0","id":"2","sour c eInputPortDescriptor":{"proxyProtocol":"HIKVISION" ,"addressingFormatType":"ipaddress","ipAddress" :"1 92.168.254.3","managePortNo":"8000","srcInputPort" :"1","userName":"admin","connMode":"plugplay"," str eamType":"auto","deviceID":null},"online":"false", "streamingProxyChannelIdList":"\n","relatedIOP roxy ":{"inputProxyPortIdList":"\n","outputProxyPor tIdL ist":"\n"},"chanDetectResult":"notExist","url":"h t tp://192.168.1.74:65002","SecurityStatus":{"PasswordSta tus":"invalid"}},{"@version":"1.0","id":"3","sour c eInputPortDescriptor":{"proxyProtocol":"HIKVISION" ,"addressingFormatType":"ipaddress","ipAddress" :"1 92.168.254.4","managePortNo":"8000","srcInputPort" :"1","userName":"admin","connMode":"plugplay"," str eamType":"auto","deviceID":null},"online":"false", "streamingProxyChannelIdList":"\n","relatedIOP roxy ":{"inputProxyPortIdList":"\n","outputProxyPor tIdL ist":"\n"},"chanDetectResult":"notExist","url":"h t tp://192.168.1.74:65003","SecurityStatus":{"PasswordSta tus":"invalid"}},{"@version":"1.0","id":"4","sour c eInputPortDescriptor":{"proxyProtocol":"HIKVISION" ,"addressingFormatType":"ipaddress","ipAddress" :"1 92.168.254.5","managePortNo":"8000","srcInputPort" :"1","userName":"admin","connMode":"plugplay"," str eamType":"auto","deviceID":null},"online":"false", "streamingProxyChannelIdList":"\n","relatedIOP roxy ":{"inputProxyPortIdList":"\n","outputProxyPor tIdL ist":"\n"},"chanDetectResult":"notExist","url":"h t tp://192.168.1.74:65004","SecurityStatus":{"PasswordSta tus":"invalid"}},{"@version":"1.0","id":"5","sour c eInputPortDescriptor":{"proxyProtocol":"HIKVISION" ,"addressingFormatType":"ipaddress","ipAddress" :"1 92.168.254.6","managePortNo":"8000","srcInputPort" :"1","userName":"admin","connMode":"plugplay"," str eamType":"auto","deviceID":null},"online":"false", "streamingProxyChannelIdList":"\n","relatedIOP roxy ":{"inputProxyPortIdList":"\n","outputProxyPor tIdL ist":"\n"},"chanDetectResult":"notExist","url":"h t tp://192.168.1.74:65005","SecurityStatus":{"PasswordSta tus":"invalid"}},{"@version":"1.0","id":"6","sour c eInputPortDescriptor":{"proxyProtocol":"HIKVISION" ,"addressingFormatType":"ipaddress","ipAddress" :"1 92.168.254.7","managePortNo":"8000","srcInputPort" :"1","userName":"admin","connMode":"plugplay"," str eamType":"auto","deviceID":null},"online":"false", "streamingProxyChannelIdList":"\n","relatedIOP roxy ":{"inputProxyPortIdList":"\n","outputProxyPor tIdL ist":"\n"},"chanDetectResult":"notExist","url":"h t tp://192.168.1.74:65006","SecurityStatus":{"PasswordSta tus":"invalid"}},{"@version":"1.0","id":"7","sour c eInputPortDescriptor":{"proxyProtocol":"HIKVISION" ,"addressingFormatType":"ipaddress","ipAddress" :"1 92.168.254.8","managePortNo":"8000","srcInputPort" :"1","userName":"admin","connMode":"plugplay"," str eamType":"auto","deviceID":null},"online":"false", "streamingProxyChannelIdList":"\n","relatedIOP roxy ":{"inputProxyPortIdList":"\n","outputProxyPor tIdL ist":"\n"},"chanDetectResult":"notExist","url":"h t tp://192.168.1.74:65007","SecurityStatus":{"PasswordSta tus":"invalid"}},{"@version":"1.0","id":"8","sour c eInputPortDescriptor":{"proxyProtocol":"HIKVISION" ,"addressingFormatType":"ipaddress","ipAddress" :"1 92.168.254.9","managePortNo":"8000","srcInputPort" :"1","userName":"admin","connMode":"plugplay"," str eamType":"auto","deviceID":null},"online":"false", "streamingProxyChannelIdList":"\n","relatedIOP roxy ":{"inputProxyPortIdList":"\n","outputProxyPor tIdL ist":"\n"},"chanDetectResult":"notExist","url":"h t tp://192.168.1.74:65008","SecurityStatus":{"PasswordSta tus":"invalid"}}]}}
Проблема такая, получаю данные с регистратора hikvision через zabbix и мне нужно выловить поле true и как на основе этого поля сделать аллерт, если поле true то все ок если <online>false</online> то не ок
но так же мне нужно в разных случаях обрабатывать не все поля.
есть где в регистратор вставлено 3 камеры из восьми и мне нужно ок только с трех камер, остальные порты отслеживать не нужно.
вот данные которые получаю по ISAPI:
запрос: http://ipадресс/ISAPI/ContentMgmt/In...hannels/status
Ответ: (для удобства выделил строки online)
{"InputProxyChannelStatusList":{"@version":"1.0 "," InputProxyChannelStatus":[{"@version":"1.0","id":"1","sourceInputPortDesc rip tor":{"proxyProtocol":"HIKVISION","addressingForm a tType":"ipaddress","ipAddress":"192.168.254.2","ma nagePortNo":"8000","srcInputPort":"1","userName":" admin","connMode":"plugplay","streamType":"auto"," deviceID":null},"online":"true","streamingProxyCha nnelIdList":{"streamingProxyChannelId":"101"},"rel atedIOProxy":{"inputProxyPortIdList":{"inputProxyP ortId":"I-101"},"outputProxyPortIdList":{"outputProxyPortId " :"O-101"}},"chanDetectResult":"connect","url":"http://192.168.1.74:65001","SecurityStatus":{"PasswordSta tus":"invalid"}},{"@version":"1.0","id":"2","sour c eInputPortDescriptor":{"proxyProtocol":"HIKVISION" ,"addressingFormatType":"ipaddress","ipAddress" :"1 92.168.254.3","managePortNo":"8000","srcInputPort" :"1","userName":"admin","connMode":"plugplay"," str eamType":"auto","deviceID":null},"online":"false", "streamingProxyChannelIdList":"\n","relatedIOP roxy ":{"inputProxyPortIdList":"\n","outputProxyPor tIdL ist":"\n"},"chanDetectResult":"notExist","url":"h t tp://192.168.1.74:65002","SecurityStatus":{"PasswordSta tus":"invalid"}},{"@version":"1.0","id":"3","sour c eInputPortDescriptor":{"proxyProtocol":"HIKVISION" ,"addressingFormatType":"ipaddress","ipAddress" :"1 92.168.254.4","managePortNo":"8000","srcInputPort" :"1","userName":"admin","connMode":"plugplay"," str eamType":"auto","deviceID":null},"online":"false", "streamingProxyChannelIdList":"\n","relatedIOP roxy ":{"inputProxyPortIdList":"\n","outputProxyPor tIdL ist":"\n"},"chanDetectResult":"notExist","url":"h t tp://192.168.1.74:65003","SecurityStatus":{"PasswordSta tus":"invalid"}},{"@version":"1.0","id":"4","sour c eInputPortDescriptor":{"proxyProtocol":"HIKVISION" ,"addressingFormatType":"ipaddress","ipAddress" :"1 92.168.254.5","managePortNo":"8000","srcInputPort" :"1","userName":"admin","connMode":"plugplay"," str eamType":"auto","deviceID":null},"online":"false", "streamingProxyChannelIdList":"\n","relatedIOP roxy ":{"inputProxyPortIdList":"\n","outputProxyPor tIdL ist":"\n"},"chanDetectResult":"notExist","url":"h t tp://192.168.1.74:65004","SecurityStatus":{"PasswordSta tus":"invalid"}},{"@version":"1.0","id":"5","sour c eInputPortDescriptor":{"proxyProtocol":"HIKVISION" ,"addressingFormatType":"ipaddress","ipAddress" :"1 92.168.254.6","managePortNo":"8000","srcInputPort" :"1","userName":"admin","connMode":"plugplay"," str eamType":"auto","deviceID":null},"online":"false", "streamingProxyChannelIdList":"\n","relatedIOP roxy ":{"inputProxyPortIdList":"\n","outputProxyPor tIdL ist":"\n"},"chanDetectResult":"notExist","url":"h t tp://192.168.1.74:65005","SecurityStatus":{"PasswordSta tus":"invalid"}},{"@version":"1.0","id":"6","sour c eInputPortDescriptor":{"proxyProtocol":"HIKVISION" ,"addressingFormatType":"ipaddress","ipAddress" :"1 92.168.254.7","managePortNo":"8000","srcInputPort" :"1","userName":"admin","connMode":"plugplay"," str eamType":"auto","deviceID":null},"online":"false", "streamingProxyChannelIdList":"\n","relatedIOP roxy ":{"inputProxyPortIdList":"\n","outputProxyPor tIdL ist":"\n"},"chanDetectResult":"notExist","url":"h t tp://192.168.1.74:65006","SecurityStatus":{"PasswordSta tus":"invalid"}},{"@version":"1.0","id":"7","sour c eInputPortDescriptor":{"proxyProtocol":"HIKVISION" ,"addressingFormatType":"ipaddress","ipAddress" :"1 92.168.254.8","managePortNo":"8000","srcInputPort" :"1","userName":"admin","connMode":"plugplay"," str eamType":"auto","deviceID":null},"online":"false", "streamingProxyChannelIdList":"\n","relatedIOP roxy ":{"inputProxyPortIdList":"\n","outputProxyPor tIdL ist":"\n"},"chanDetectResult":"notExist","url":"h t tp://192.168.1.74:65007","SecurityStatus":{"PasswordSta tus":"invalid"}},{"@version":"1.0","id":"8","sour c eInputPortDescriptor":{"proxyProtocol":"HIKVISION" ,"addressingFormatType":"ipaddress","ipAddress" :"1 92.168.254.9","managePortNo":"8000","srcInputPort" :"1","userName":"admin","connMode":"plugplay"," str eamType":"auto","deviceID":null},"online":"false", "streamingProxyChannelIdList":"\n","relatedIOP roxy ":{"inputProxyPortIdList":"\n","outputProxyPor tIdL ist":"\n"},"chanDetectResult":"notExist","url":"h t tp://192.168.1.74:65008","SecurityStatus":{"PasswordSta tus":"invalid"}}]}}
Comment