Everything works fine, syntax is OK, problem is only with Windows 2019 (not reading WMI) with Win2016 is OK

 

1 Win2016 query,  OK

2 win2019 query, FAIL

Both servers have the same SNMP + WMI Provider settings

 


Pozdrawiam

Jacek Dąbrowski

From: observium <observium-bounces@observium.org> On Behalf Of Adam Armstrong via observium
Sent: Friday, April 23, 2021 4:01 PM
To: 'Observium' <observium@observium.org>
Cc: Adam Armstrong <adama@observium.org>
Subject: Re: [Observium] Probes check_snmp_win

 

This is one that isn’t usually in the plugins packages, so we include it :

 

/opt/observium/probes/nagios/check_snmp_win

 

You probably shouldn’t be setting -C, as that’s set by us automatically. This is what we’ll set for default + snmp v2:

 

$config['probes'][$probe]['args']['default']         = "-H %hostname% -v %snmp_version% --snmpport=%snmp_port% -t %snmp_timeout%";

$config['probes'][$probe]['args']['v2c']             = "-C %snmp_community%";

 

As Ahmed said, you can just run the plugin manually to test various parameters. I’d recommend running the poller in debug for the probes module to get the actual commandline being used :

 

./poller.php -h <device_id> -m probe -d -r

 

You’ll see something like this :

 

including: includes/polling/probes.inc.php

#####  Module Start: probes  #####

 

 

SQL[SELECT * FROM  `probes` WHERE `device_id` = '713']

SQL RUNTIME[0.00501299s]

/opt/observium/probes/nagios/check_snmp_cisco_config  -H 'x.x.108.41' -p '161' -t '15' -2 -C 'public'

 

CMD[/opt/observium/probes/nagios/check_snmp_cisco_config  -H 'x.x.108.41' -p '161' -t '15' -2 -C 'public']

 

CMD EXITCODE[0]

CMD RUNTIME[0.4624s]

STDOUT[

Running config has been saved : OK

]

RRD /opt/observium/rrd/x.x.108.41/probe-17.rrd already exists - no need to create.

 

You can pull the command out of this and use it as a basis for testing.

 

Adam.

 

From: observium <observium-bounces@observium.org> On Behalf Of Jacek Dabrowski via observium
Sent: 23 April 2021 14:53
To: observium@observium.org
Cc: Jacek.Dabrowski@selgros.pl
Subject: Re: [Observium] Probes check_snmp_win

 

I do not see such a module check_snmp_win in this location

 

 

jdadmin@pl-smonobservium:/usr/lib/nagios/plugins$ ls

check_apt      check_dbi       check_dns       check_ftp   check_icmp          check_ircd    check_log       check_mysql_query  check_ntp       check_overcr  check_real       check_smtp   check_swap  check_users  utils.sh

check_breeze   check_dhcp      check_dummy     check_game  check_ide_smart     check_jabber  check_mailq     check_nagios       check_ntp_peer  check_pgsql   check_rpc        check_snmp   check_tcp   check_wave

check_by_ssh   check_dig       check_file_age  check_host  check_ifoperstatus  check_ldap    check_mrtg      check_nntp         check_ntp_time  check_ping    check_rta_multi  check_spop   check_time  negate

check_clamd    check_disk      check_flexlm    check_hpjd  check_ifstatus      check_ldaps   check_mrtgtraf  check_nntps        check_nwstat    check_pop     check_sensors    check_ssh    check_udp   urlize

check_cluster  check_disk_smb  check_fping     check_http  check_imap          check_load    check_mysql     check_nt           check_oracle    check_procs   check_simap      check_ssmtp  check_ups   utils.pm

jdadmin@pl-smonobservium:/usr/lib/nagios/plugins$


Pozdrawiam

Jacek Dąbrowski