Skip to content

Commit d69b805

Browse files
axiscam: add CPU and memory polling for AXIS OS 12.10+ (librenms#19639)
Replace AXIS-VIDEO-MIB and AXIS-ROOT-MIB with official files obtained directly from Axis Communications, adding the basicDeviceInfo subtree (1.3.6.1.4.1.368.4.1.100) introduced in AXIS OS 12.10 and a new RAID subtree (videoObjects 10). Add os_discovery/axiscam.yaml to poll CPU (processors) and memory (mempools) on devices running AXIS OS 12.10 or later. Add device_processor and device_mempool graphs to axiscam os_detection. Add test fixtures for AXIS Q6074 running AXIS OS 12.10.68. Backwards compatible � tested against AXIS M3077-PLVE running AXIS OS 11.11, older devices gracefully return no data for the new OIDs.
1 parent 8c3340e commit d69b805

6 files changed

Lines changed: 611 additions & 2 deletions

File tree

mibs/axis/AXIS-ROOT-MIB

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ products OBJECT-IDENTITY
3434
::= { axis 1 }
3535

3636
END
37+

mibs/axis/AXIS-VIDEO-MIB

Lines changed: 234 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ IMPORTS
66
MODULE-COMPLIANCE, NOTIFICATION-GROUP, OBJECT-GROUP
77
FROM SNMPv2-CONF -- RFC 2580
88
Integer32, MODULE-IDENTITY, NOTIFICATION-TYPE, OBJECT-TYPE,
9-
Unsigned32
9+
Unsigned32, TimeTicks
1010
FROM SNMPv2-SMI -- RFC 2578
1111
SnmpAdminString
1212
FROM SNMP-FRAMEWORK-MIB; -- RFC 3411
@@ -400,6 +400,213 @@ storageDisruptionDetected OBJECT-TYPE
400400

401401
--- { videoObjects 9 }, reserved for tampering
402402

403+
--- RAID
404+
raid OBJECT IDENTIFIER ::= { videoObjects 10 }
405+
406+
raidTable OBJECT-TYPE
407+
SYNTAX SEQUENCE OF RaidEntry
408+
MAX-ACCESS not-accessible
409+
STATUS current
410+
DESCRIPTION
411+
"A list of RAID information, one entry for each RAID"
412+
::= { raid 1 }
413+
414+
raidEntry OBJECT-TYPE
415+
SYNTAX RaidEntry
416+
MAX-ACCESS not-accessible
417+
STATUS current
418+
DESCRIPTION
419+
"A RAID entry contains information about a specific RAID"
420+
INDEX { raidId }
421+
::= { raidTable 1 }
422+
423+
RaidEntry ::= SEQUENCE {
424+
raidId Unsigned32,
425+
raidStatus INTEGER
426+
}
427+
428+
raidId OBJECT-TYPE
429+
SYNTAX Unsigned32 (1..128)
430+
MAX-ACCESS not-accessible
431+
STATUS current
432+
DESCRIPTION
433+
"Used to identify a RAID"
434+
::= { raidEntry 1 }
435+
436+
raidStatus OBJECT-TYPE
437+
SYNTAX INTEGER { active(1), degraded(2), syncing(3), failure(4) }
438+
MAX-ACCESS read-only
439+
STATUS current
440+
DESCRIPTION
441+
"The status of the RAID"
442+
::= { raidEntry 2 }
443+
444+
raidComponentTable OBJECT-TYPE
445+
SYNTAX SEQUENCE OF RaidComponentEntry
446+
MAX-ACCESS not-accessible
447+
STATUS current
448+
DESCRIPTION
449+
"A list of RAID component status, one entry for each RAID component in
450+
each RAID"
451+
::= { raid 2 }
452+
453+
raidComponentEntry OBJECT-TYPE
454+
SYNTAX RaidComponentEntry
455+
MAX-ACCESS not-accessible
456+
STATUS current
457+
DESCRIPTION
458+
"A RAID component entry contains information about a specific RAID
459+
component"
460+
INDEX { raidId, raidComponentId }
461+
::= { raidComponentTable 1 }
462+
463+
RaidComponentEntry ::= SEQUENCE {
464+
raidComponentId Unsigned32,
465+
raidComponentName SnmpAdminString,
466+
raidComponentStatus INTEGER
467+
}
468+
469+
raidComponentId OBJECT-TYPE
470+
SYNTAX Unsigned32 (1..128)
471+
MAX-ACCESS not-accessible
472+
STATUS current
473+
DESCRIPTION
474+
"Used to identify a RAID component"
475+
::= { raidComponentEntry 1 }
476+
477+
raidComponentName OBJECT-TYPE
478+
SYNTAX SnmpAdminString (SIZE(0..32))
479+
MAX-ACCESS read-only
480+
STATUS current
481+
DESCRIPTION
482+
"Used to identify a RAID component. If the original string is longer
483+
than the specified length then the middle of the string will be
484+
replaced by '..' in such a way that the length of the string becomes
485+
32 characters anyway."
486+
::= { raidComponentEntry 2 }
487+
488+
raidComponentStatus OBJECT-TYPE
489+
SYNTAX INTEGER { connected(1), spare(2), missing(3) }
490+
MAX-ACCESS read-only
491+
STATUS current
492+
DESCRIPTION
493+
"The status of the RAID component."
494+
::= { raidComponentEntry 3 }
495+
496+
--- Basic device info
497+
basicDeviceInfo OBJECT IDENTIFIER ::= { videoObjects 100 }
498+
499+
memoryInfo OBJECT IDENTIFIER ::= { basicDeviceInfo 1 }
500+
501+
deviceMemoryUtilization OBJECT-TYPE
502+
SYNTAX Unsigned32 (0..100)
503+
MAX-ACCESS read-only
504+
STATUS current
505+
DESCRIPTION
506+
"The percentage of system memory in use."
507+
::= { memoryInfo 1 }
508+
509+
deviceMemoryTotal OBJECT-TYPE
510+
SYNTAX Unsigned32
511+
MAX-ACCESS read-only
512+
STATUS current
513+
DESCRIPTION
514+
"The total amount of available system memory, in kB."
515+
::= { memoryInfo 2 }
516+
517+
deviceMemoryUsed OBJECT-TYPE
518+
SYNTAX Unsigned32
519+
MAX-ACCESS read-only
520+
STATUS current
521+
DESCRIPTION
522+
"The amount of system memory in use, in kB."
523+
::= { memoryInfo 3 }
524+
525+
flashInfo OBJECT IDENTIFIER ::= { basicDeviceInfo 2 }
526+
527+
deviceFlashUtilization OBJECT-TYPE
528+
SYNTAX Unsigned32 (0..100)
529+
MAX-ACCESS read-only
530+
STATUS current
531+
DESCRIPTION
532+
"The percentage of flash storage in use."
533+
::= { flashInfo 1 }
534+
535+
deviceFlashTotal OBJECT-TYPE
536+
SYNTAX Unsigned32
537+
MAX-ACCESS read-only
538+
STATUS current
539+
DESCRIPTION
540+
"The total amount of flash storage available, in MB."
541+
::= { flashInfo 2 }
542+
543+
deviceFlashUsed OBJECT-TYPE
544+
SYNTAX Unsigned32
545+
MAX-ACCESS read-only
546+
STATUS current
547+
DESCRIPTION
548+
"The amount of flash in use, in MB."
549+
::= { flashInfo 3 }
550+
551+
cpuInfo OBJECT IDENTIFIER ::= { basicDeviceInfo 3 }
552+
553+
deviceCpuUtilization OBJECT-TYPE
554+
SYNTAX Unsigned32 (0..100)
555+
MAX-ACCESS read-only
556+
STATUS current
557+
DESCRIPTION
558+
"The percentage of time the CPU is actively working."
559+
::= { cpuInfo 1 }
560+
561+
deviceSystemLoad OBJECT-TYPE
562+
SYNTAX SnmpAdminString
563+
MAX-ACCESS read-only
564+
STATUS current
565+
DESCRIPTION
566+
"The number of processes running or waiting on the cpu.
567+
Represented by 1-minute, 5-minute, 15-minute averages."
568+
::= { cpuInfo 2 }
569+
570+
deviceUptime OBJECT-TYPE
571+
SYNTAX TimeTicks
572+
MAX-ACCESS read-only
573+
STATUS current
574+
DESCRIPTION
575+
"The time since the system was last re-initialized."
576+
::= { basicDeviceInfo 4 }
577+
578+
deviceSoftware OBJECT-TYPE
579+
SYNTAX SnmpAdminString
580+
MAX-ACCESS read-only
581+
STATUS current
582+
DESCRIPTION
583+
"The AxisOS version running on the device."
584+
::= { basicDeviceInfo 5 }
585+
586+
deviceSerialNumber OBJECT-TYPE
587+
SYNTAX SnmpAdminString
588+
MAX-ACCESS read-only
589+
STATUS current
590+
DESCRIPTION
591+
"The serial number of the device."
592+
::= { basicDeviceInfo 6 }
593+
594+
deviceManufacturer OBJECT-TYPE
595+
SYNTAX SnmpAdminString
596+
MAX-ACCESS read-only
597+
STATUS current
598+
DESCRIPTION
599+
"The manufacturer of the device."
600+
::= { basicDeviceInfo 7 }
601+
602+
deviceModel OBJECT-TYPE
603+
SYNTAX SnmpAdminString
604+
MAX-ACCESS read-only
605+
STATUS current
606+
DESCRIPTION
607+
"The model name of the device."
608+
::= { basicDeviceInfo 8 }
609+
403610
-- Objects used in Private Enterprise Traps
404611
videoNotifications OBJECT IDENTIFIER
405612
::= { video 2 }
@@ -472,7 +679,8 @@ videoObjectGroup OBJECT-GROUP
472679
OBJECTS { powerSupplyStatus, fanStatus, tempSensorStatus,
473680
tempSensorValue, videoSignalStatus, audioSignalStatus,
474681
casingName, casingStatus, storageDisruptionDetected,
475-
storageName, alarmID, alarmName, alarmText }
682+
storageName, raidStatus, raidComponentName,
683+
raidComponentStatus, alarmID, alarmName, alarmText }
476684
STATUS obsolete
477685
DESCRIPTION
478686
"A collection of video objects."
@@ -506,6 +714,24 @@ storageGroup OBJECT-GROUP
506714
"Objects related to Axis storage."
507715
::= { videoGroups 5 }
508716

717+
raidGroup OBJECT-GROUP
718+
OBJECTS { raidStatus, raidComponentName, raidComponentStatus }
719+
STATUS current
720+
DESCRIPTION
721+
"Objects related to Axis RAID."
722+
::= { videoGroups 6 }
723+
724+
basicDeviceInfoGroup OBJECT-GROUP
725+
OBJECTS { deviceMemoryUtilization, deviceMemoryTotal, deviceMemoryUsed,
726+
deviceFlashTotal, deviceFlashUsed, deviceFlashUtilization,
727+
deviceCpuUtilization, deviceSystemLoad, deviceUptime,
728+
deviceSoftware, deviceSerialNumber, deviceManufacturer,
729+
deviceModel }
730+
STATUS current
731+
DESCRIPTION
732+
"Objects related to basic device information."
733+
::= { videoGroups 7 }
734+
509735
-- Compliance Statements
510736
videoComplianceRev2 MODULE-COMPLIANCE
511737
STATUS current
@@ -555,6 +781,11 @@ videoComplianceRev2 MODULE-COMPLIANCE
555781
storage device connected and for which it is possible to check the
556782
state."
557783

784+
GROUP raidGroup
785+
DESCRIPTION
786+
"This group is mandatory for all Axis video products that have
787+
RAID capabilities, for which it is possible to check the status."
788+
558789
::= { videoCompliances 2 }
559790

560791
videoCompliance MODULE-COMPLIANCE
@@ -574,3 +805,4 @@ videoCompliance MODULE-COMPLIANCE
574805
::= { videoCompliances 1 }
575806

576807
END -- end of module AXIS-VIDEO-MIB.
808+

resources/definitions/os_detection/axiscam.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ discovery:
88
sysDescr_regex: '/AXIS .* ((Network|Bullet|PTZ|Dome|Panoramic|Box) Camera|Security Radar|Video (Server|Decoder)|Network Video Encoder)/'
99
over:
1010
- { graph: device_bits, text: Traffic }
11+
- { graph: device_processor, text: 'CPU Usage' }
12+
- { graph: device_mempool, text: 'Memory Usage' }
1113
- { graph: device_temperature, text: 'Device Temperature' }
1214
- { graph: device_state, text: 'Device State' }
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
modules:
2+
mempools:
3+
data:
4+
-
5+
used: AXIS-VIDEO-MIB::deviceMemoryUsed.0
6+
total: AXIS-VIDEO-MIB::deviceMemoryTotal.0
7+
descr: 'System Memory'
8+
precision: 1024
29
os:
310
sysDescr_regex: '/(?<hardware>[^;]+); [^;]+; (?<version>[^;]+)/'
411
serial:
512
- IF-MIB::ifPhysAddress.2
13+
processors:
14+
data:
15+
-
16+
oid: AXIS-VIDEO-MIB::deviceCpuUtilization
17+
num_oid: '.1.3.6.1.4.1.368.4.1.100.3.1.{{ $index }}'
18+
index: 0
19+
descr: 'CPU'

0 commit comments

Comments
 (0)