5.02021-11-21T21:55:06ZTemplatesEocortexEocortex## Overview
This template will monitor the following items of a Eocortex (or Macroscop) server:
- Service State (Windows Service)
- Eocortex version (through the API)
- Last recording (by monitoring D:\EocortexArchive\ArchiveLogicDrive.xml, if you have more drives or different drive letters this needs modifying)
- Total number of camera's (through the API)
- Number of offline camera's (through the API)
- CPU usage (i raised the default trigger because it's common for a Eocortex server doing video analytics to have high CPU usage)
It needs two macro's to be configured on the host:
{$EOCORTEX\_PASSWORD} Eocortex password in MD5 hash
{$EOCORTEX\_USER} = Eocortex Username
The user doesnt need any specific permissions in Eocortex.
It's all configured with active checks, so make sure your agent works with the active checks or change it to passive checks.
The agent will connect to localhost; if you have multiple Eocortex servers, just add all servers.
I'm using Zabbix 4.4.4 but there is nothing very specific so it will probably also work on older versions.
## Author
ARAS Security B.V.
TemplatesEocortex- Agent pingZABBIX_ACTIVEagent.ping{nodata(1800)}=1Agent offline for 30 minutesWARNING
- Average disk read queue lengthZABBIX_ACTIVEperf_counter[\234(_Total)\1402]607dFLOATFull counter name: \PhysicalDisk(_Total)\Avg. Disk Read Queue LengthPOST
- Average disk write queue lengthZABBIX_ACTIVEperf_counter[\234(_Total)\1404]607dFLOATFull counter name: \PhysicalDisk(_Total)\Avg. Disk Write Queue LengthPOST
- Eocortex ServiceZABBIX_ACTIVEservice_state[EocortexServer]30sEocortexWindows service statePOST{last()}<>0Eocortex Service not running on {HOST.NAME}HIGH
- Processor load (5 min average)ZABBIX_ACTIVEsystem.cpu.load[percpu,avg5]607dFLOATPOST{last()}>60Processor load is too high on {HOST.NAME}HIGH
- Free swap spaceZABBIX_ACTIVEsystem.swap.size[,free]607dBPOST
- Total swap spaceZABBIX_ACTIVEsystem.swap.size[,total]36007dBPOST
- System informationZABBIX_ACTIVEsystem.uname36007d0CHAROSPOST
- System uptimeZABBIX_ACTIVEsystem.uptime607duptimePOST
- Last recordingZABBIX_ACTIVEvfs.file.time[D:\EocortexArchive\ArchiveLogicDrive.xml,modify]unixtimeEocortex{now()} - {last()}>300Recording stopped for more then 5 minutesHIGH
- Free disk space on C: (percentage)ZABBIX_ACTIVEvfs.fs.size[C:,pfree]60mFLOAT%{last()}<20Free disk space is less than 20% on volume C:WARNING
- Free memoryZABBIX_ACTIVEvm.memory.size[free]607dBPOST
- Total memoryZABBIX_ACTIVEvm.memory.size[total]36007dBPOST
- Number of camera'sZABBIX_ACTIVEweb.page.get[127.0.0.1,/command?type=getchannelsstates&login={$EOCORTEX_USER}&password={$EOCORTEX_PASSWORD}&responsetype=json,8080]60mEocortexJAVASCRIPTvar count = (value.match(/MainVideo/g) || []).length;
return count
- Eocortex VersionZABBIX_ACTIVEweb.page.get[127.0.0.1,/configex?login={$EOCORTEX_USER}&password={$EOCORTEX_PASSWORD}&responsetype=json,8080]90m0CHAREocortexREGEX(?<=ServerVersion["]:\s["])[\d|.]*
\0
- Number of camera's offlineZABBIX_ACTIVEweb.page.get[localhost,/command?type=getchannelsstates&login={$EOCORTEX_USER}&password={$EOCORTEX_PASSWORD}&responsetype=json,8080]EocortexJAVASCRIPTvar count = (value.match(/["]Type["]\:\s*\"MainVideo["]\,\s*["]State["]\:\s*["]NoConnection["]/g) || []).length;
return count{last()}=1Camera offline on {HOST.NAME}WARNING{last()}>1Multiple camera's offline on {HOST.NAME}WARNING
Windows service state0Running1Paused2Start pending3Pause pending4Continue pending5Stop pending6Stopped7Unknown255No such service