# Hikvision camera by HTTP ## Overview Sample device overview page: https://www.hikvision.com/en/products/IP-Products/Network-Cameras/ ## Requirements Zabbix version: 7.0 and higher. ## Tested versions This template has been tested on: - DS-I220 - DS-I450 - DS-2CD2620F-I - DS-2CD1631FWD-I - DS-2CD2020F-I - DS-2CD2042WD-I - DS-2CD2T43G0-I5 - DS-2DF5286-AEL - DS-2CD2T25FWD-I5 - DS-2CD4A35FWD-IZHS - DS-I200 - DS-2CD1031-I - DS-2CD2125FWD-IS - DS-I122 - DS-I203 - DS-N201 - DS-2CD2622FWD-IZS - DS-2CD2023G0-I ## Configuration > Zabbix should be configured according to the instructions in the [Templates out of the box](https://www.zabbix.com/documentation/7.0/manual/config/templates_out_of_the_box) section. ## Setup Define macros according to your camera configuration ### Macros used |Name|Description|Default| |----|-----------|-------| |{$CPU.UTIL.CRIT}||`90`| |{$HIKVISION_ISAPI_PORT}|
ISAPI port on device
|`80`| |{$HIKVISION_MAIN_CHANNEL_ID}|Main video stream ID
|`101`| |{$HIKVISION_STREAM_HEIGHT}|Main video stream image height
|`1080`| |{$HIKVISION_STREAM_WIDTH}|Main video stream image width
|`1920`| |{$MEMORY.UTIL.MAX}||`95`| |{$PASSWORD}||`1234`| |{$USER}||`admin`| ### Items |Name|Description|Type|Key and additional info| |----|-----------|----|-----------------------| |Hikvision camera: Boot loader released date||Dependent item|hikvision_cam.boot_released_date**Preprocessing**
JSON Path: `$.DeviceInfo.bootReleasedDate`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
**Preprocessing**
JSON Path: `$.DeviceInfo.bootVersion`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
CPU utilization in %
|Dependent item|hikvision_cam.cpu.util**Preprocessing**
JSON Path: `$.DeviceStatus.CPUList.CPU.cpuUtilization`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `$.DeviceStatus.currentDeviceTime`
⛔️Custom on fail: Discard value
**Preprocessing**
JSON Path: `$.DeviceInfo.deviceDescription`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
**Preprocessing**
JSON Path: `$.DeviceInfo.deviceID`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
**Preprocessing**
JSON Path: `$.DeviceInfo.deviceLocation`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
**Preprocessing**
JSON Path: `$.DeviceInfo.deviceName`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1d`
**Preprocessing**
JSON Path: `$.DeviceInfo.deviceType`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
**Preprocessing**
JSON Path: `$.DeviceInfo.encoderReleasedDate`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
**Preprocessing**
JSON Path: `$.DeviceInfo.encoderVersion`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
**Preprocessing**
JSON Path: `$.DeviceInfo.firmwareReleasedDate`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
**Preprocessing**
JSON Path: `$.DeviceInfo.firmwareVersion`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
Used to get the device information
|HTTP agent|hikvision_cam.get_info**Preprocessing**
⛔️Custom on fail: Set value to: `{"html":{"head":{"title":"Connection error"}}}`
⛔️Custom on fail: Set value to: `{"html":{"head":{"title":"Connection error"}}}`
**Preprocessing**
JavaScript: `The text is too long. Please see the template.`
Discard unchanged with heartbeat: `1h`
It is used to get the status information of the device
|HTTP agent|hikvision_cam.get_status**Preprocessing**
⛔️Custom on fail: Set value to: `{"html":{"head":{"title":"Connection error"}}}`
⛔️Custom on fail: Set value to: `{"html":{"head":{"title":"Connection error"}}}`
**Preprocessing**
JavaScript: `The text is too long. Please see the template.`
Discard unchanged with heartbeat: `1h`
Used to get the properties of streaming channels for the device
|HTTP agent|hikvision_cam.get_streaming**Preprocessing**
⛔️Custom on fail: Set value to: `{"html":{"head":{"title":"Connection error"}}}`
⛔️Custom on fail: Set value to: `{"html":{"head":{"title":"Connection error"}}}`
**Preprocessing**
JavaScript: `The text is too long. Please see the template.`
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `$.DeviceInfo.hardwareVersion`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
**Preprocessing**
JSON Path: `$.DeviceInfo.macAddress`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
Memory utilization in %
|Dependent item|hikvision_cam.memory.usage**Preprocessing**
JSON Path: `$.DeviceStatus.MemoryList.Memory.memoryUsage`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `$.DeviceInfo.model`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
**Preprocessing**
JSON Path: `$.DeviceInfo.serialNumber`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
**Preprocessing**
JSON Path: `$.DeviceInfo.supportBeep`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
**Preprocessing**
JSON Path: `$.DeviceInfo.supportVideoLoss`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
**Preprocessing**
JSON Path: `$.DeviceInfo.systemContact`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
**Preprocessing**
JSON Path: `$.DeviceInfo.telecontrolID`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `24h`
The system uptime expressed in the following format: "N days, hh:mm:ss".
|Dependent item|hikvision_cam.uptime**Preprocessing**
JSON Path: `$.DeviceStatus.deviceUpTime`
⛔️Custom on fail: Discard value
The CPU utilization is too high. The system might be slow to respond.
|`min(/Hikvision camera by HTTP/hikvision_cam.cpu.util,5m)>{$CPU.UTIL.CRIT}`|Warning|| |Hikvision camera: Version has changed|Hikvision camera version has changed. Acknowledge to close the problem manually.
|`last(/Hikvision camera by HTTP/hikvision_cam.firmware_version,#1)<>last(/Hikvision camera by HTTP/hikvision_cam.firmware_version,#2) and length(last(/Hikvision camera by HTTP/hikvision_cam.firmware_version))>0`|Info|**Manual close**: Yes| |Hikvision camera: Authorisation error|Check the correctness of the authorization data
|`last(/Hikvision camera by HTTP/hikvision_cam.get_info.login_status)=1 or last(/Hikvision camera by HTTP/hikvision_cam.get_streaming.login_status)=1 or last(/Hikvision camera by HTTP/hikvision_cam.get_status.login_status)=1`|Warning|**Manual close**: Yes| |Hikvision camera: Error receiving data|Check the availability of the HTTP port
|`last(/Hikvision camera by HTTP/hikvision_cam.get_info.login_status)=2 or last(/Hikvision camera by HTTP/hikvision_cam.get_streaming.login_status)=2 or last(/Hikvision camera by HTTP/hikvision_cam.get_status.login_status)=2`|Warning|**Manual close**: Yes| |Hikvision camera: High memory utilization|The system is running out of free memory.
|`min(/Hikvision camera by HTTP/hikvision_cam.memory.usage,5m)>{$MEMORY.UTIL.MAX}`|Average|| |Hikvision camera: Camera has been replaced|Camera serial number has changed. Acknowledge to close the problem manually.
|`last(/Hikvision camera by HTTP/hikvision_cam.serial_number,#1)<>last(/Hikvision camera by HTTP/hikvision_cam.serial_number,#2) and length(last(/Hikvision camera by HTTP/hikvision_cam.serial_number))>0`|Info|**Manual close**: Yes| |Hikvision camera: has been restarted|Uptime is less than 10 minutes.
|`last(/Hikvision camera by HTTP/hikvision_cam.uptime)<10m`|Info|**Manual close**: Yes| ### LLD rule PTZ discovery |Name|Description|Type|Key and additional info| |----|-----------|----|-----------------------| |PTZ discovery||HTTP agent|hikvision_cam.ptz.discovery**Preprocessing**
JavaScript: `The text is too long. Please see the template.`
**Preprocessing**
JavaScript: `The text is too long. Please see the template.`
Discard unchanged with heartbeat: `1h`
High precision positioning which is accurate to a bit after the decimal point
|HTTP agent|hikvision_cam.get_ptz[{#PTZ_CHANNEL_ID}]**Preprocessing**
⛔️Custom on fail: Set value to: `{"html":{"head":{"title":"Connection error"}}}`
⛔️Custom on fail: Set value to: `{"html":{"head":{"title":"Connection error"}}}`
**Preprocessing**
JSON Path: `$.PTZStatus.AbsoluteHigh.absoluteZoom`
⛔️Custom on fail: Discard value
Custom multiplier: `0.1`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `$.PTZStatus.AbsoluteHigh.azimuth`
⛔️Custom on fail: Discard value
Custom multiplier: `0.1`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `$.PTZStatus.AbsoluteHigh.elevation`
⛔️Custom on fail: Discard value
Custom multiplier: `0.1`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
Check the correctness of the authorization data
|`last(/Hikvision camera by HTTP/hikvision_cam.get_ptz.login_status[{#PTZ_CHANNEL_ID}])=1`|Warning|**Manual close**: YesCheck the availability of the HTTP port
|`last(/Hikvision camera by HTTP/hikvision_cam.get_ptz.login_status[{#PTZ_CHANNEL_ID}])=2`|Warning|**Manual close**: YesThe direction of the camera has changed
|`last(/Hikvision camera by HTTP/hikvision_cam.ptz.absolute_zoom[{#PTZ_CHANNEL_ID}],#1)<>last(/Hikvision camera by HTTP/hikvision_cam.ptz.absolute_zoom[{#PTZ_CHANNEL_ID}],#2) or last(/Hikvision camera by HTTP/hikvision_cam.ptz.azimuth[{#PTZ_CHANNEL_ID}],#1)<>last(/Hikvision camera by HTTP/hikvision_cam.ptz.azimuth[{#PTZ_CHANNEL_ID}],#2) or last(/Hikvision camera by HTTP/hikvision_cam.ptz.elevation[{#PTZ_CHANNEL_ID}],#1)<>last(/Hikvision camera by HTTP/hikvision_cam.ptz.elevation[{#PTZ_CHANNEL_ID}],#2)`|Info|**Manual close**: Yes| ### LLD rule Streaming channels discovery |Name|Description|Type|Key and additional info| |----|-----------|----|-----------------------| |Streaming channels discovery||HTTP agent|hikvision_cam.streaming.discovery**Preprocessing**
JavaScript: `The text is too long. Please see the template.`
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$.[0]`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$[0]`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$[0]`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$[0]`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$[0]`
⛔️Custom on fail: Discard value
Custom multiplier: `0.01`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$[0]`
⛔️Custom on fail: Discard value
Custom multiplier: `0.01`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$[0]`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$[0]`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$[0]`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$[0]`
⛔️Custom on fail: Discard value
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$[0]`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$[0]`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$[0]`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$[0]`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
**Preprocessing**
JSON Path: `The text is too long. Please see the template.`
⛔️Custom on fail: Discard value
JSON Path: `$[0]`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `1h`
expected: {$HIKVISION_STREAM_WIDTH} px x {$HIKVISION_STREAM_HEIGHT} px
received: {ITEM.LASTVALUE2} x {ITEM.LASTVALUE1}