Invalid pattern ! Usage: check_snmp_win

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Invalid pattern ! Usage: check_snmp_win

Post by dlukinski »

Ran into the problem of monitoring Windows 2008 R2 Service via SNMP (only this service, other services from the same host and other servers are ok so far);
Here is the TEXT:
define service {
host_name fihp-m4r1.res.kcg.global
service_description Siebel Server [PROD_fihp-m4r1]
use xiwizard_windowssnmp_service
check_command check_xi_service_snmp_win_service! -C HP_private --v2c -n 'Siebel Server [PROD_somesrvname]'!!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
first_notification_delay 10
notification_period xi_timeperiod_24x7
notifications_enabled 1
contacts lukindi
contact_groups SIEBEL
_xiwizard windowssnmp
register 1
}
-------------------------------------------------
Nagios XI is unable to monitor this one as follows: Invalid pattern ! Usage: check_snmp_win [-v] -H <host> -C <snmp_community> [-2

------------------------------------------------
Check Command ran from the same service configuration actually works:
COMMAND: /usr/local/nagios/libexec/check_snmp_win.pl -H 10.102.33.114 -C HP_private --v2c -n 'Siebel Server \[PROD_fihp-m4r1\]'
OUTPUT: 1 services active (matching "Siebel Server \[PROD_somesrvname\]") : OK
-----------------------------------------------
Check command as GUI presents one does not appear to be the same as the Service configuration. What went wrong?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Invalid pattern ! Usage: check_snmp_win

Post by lmiltchev »

Go to Service Detail->click on the "Siebel Server [PROD_fihp-m4r1]" service->Configure->Re-configure this service and modify your command by changing:

Code: Select all

'Siebel Server [PROD_somesrvname]'
to this:

Code: Select all

'Siebel Server \[PROD_fihp-m4r1\]'
Note: Basically, escape the "[" and "]" with a backslash.

Click on "Update" and force an immediate check. Did this help?
Be sure to check out our Knowledgebase for helpful articles and solutions!
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Invalid pattern ! Usage: check_snmp_win

Post by dlukinski »

lmiltchev wrote:Go to Service Detail->click on the "Siebel Server [PROD_fihp-m4r1]" service->Configure->Re-configure this service and modify your command by changing:

Code: Select all

'Siebel Server [PROD_somesrvname]'
to this:

Code: Select all

'Siebel Server \[PROD_fihp-m4r1\]'
Note: Basically, escape the "[" and "]" with a backslash.

Click on "Update" and force an immediate check. Did this help?
Yes I figured before I read your post. \[....\] pattern and same for \(...\).
Thank you.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Invalid pattern ! Usage: check_snmp_win

Post by rkennedy »

Am I good to close this thread then or do you need more assistance?
Former Nagios Employee
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Invalid pattern ! Usage: check_snmp_win

Post by dlukinski »

rkennedy wrote:Am I good to close this thread then or do you need more assistance?
Yes please and Thank you
Locked