check_nwc_health icon indicating copy to clipboard operation
check_nwc_health copied to clipboard

Add support for Meraki devices

Open meni2029 opened this issue 2 years ago • 4 comments

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

meni2029 avatar Nov 25 '21 17:11 meni2029

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

uwereiter avatar Jul 27 '22 13:07 uwereiter

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

meni2029 avatar Jul 27 '22 13:07 meni2029

Excellent! That solved my issue. Thank you for your quick help.

Best regards

uwereiter avatar Jul 27 '22 14:07 uwereiter