check_nwc_health
check_nwc_health copied to clipboard
Add support for Meraki devices
Hello, is it possible to add support for Meraki devices snmp polling ? Currently it is not working because there's no sysUptime available from Meraki. But if we add a fake sysUptime in the code of check_nwc_health, then interfaces checks are working.
All the details here: https://documentation.meraki.com/General_Administration/Monitoring_and_Reporting/SNMP_Overview_and_Configuration
I just added this code to avoid the missing sysUptime issue:
if ($sysDescr =~ /meraki/i) {
$sysUptime = 100 * 3600;
}
Thanks for your consideration Cheers
Hi meni2029,
I'm also struggling with Meraki devices and the missing sysUptime for check_nwc_health. Where exactly did you place this code to have a workaound for interface monitoring?
Best regards
Hi @uwereiter
Where exactly did you place this code to have a workaound for interface monitoring?
I placed it in the sub check_snmp_and_model
, in the part gathering the uptime info:
my $tic = time;
# Datatype TimeTicks = 1/100s
my $sysUptime = $self->get_snmp_object('MIB-2-MIB', 'sysUpTime', 0);
# Datatype Integer32 = 1s
my $snmpEngineTime = $self->get_snmp_object('SNMP-FRAMEWORK-MIB', 'snmpEngineTime');
# Datatype TimeTicks = 1/100s
my $hrSystemUptime = $self->get_snmp_object_maybe('HOST-RESOURCES-MIB', 'hrSystemUptime');
my $sysDescr = $self->get_snmp_object('MIB-2-MIB', 'sysDescr', 0);
if ((!defined $sysUptime) && ($sysDescr =~ /meraki/i)) {
$sysUptime = 100 * 3600;
}
my $tac = time;
Best regards
Excellent! That solved my issue. Thank you for your quick help.
Best regards