|
|||||||||||
|
Re: [Nagios-users] check_snmp_int.pl regex problems
From: Dan Eriksson <Dan.Eriksson(at)springmobil.se>
Date: Tue Jun 26 2007 - 10:44:31 EDT
According to this,
It seems like you need to put single quotes instead of double quotes like, as you want to match on "Intel(R) PRO/1000 MT Network Connection" and only this. Then I guess your check_command should look something like: /check_command check_snmp_int!'PRO/1000 MT Network Connection$' Hope this helps,
Best regards,
-----Ursprungligt meddelande-----
I have 2 interfaces:
Intel(R) PRO/1000 MT Network Connection
I need to filter out " Intel(R) PRO/1000 MT Network Connection #2" . The following are some of the commands I have tried. /check_command check_snmp_int!""
this cuts out anything that matches MT, so I know that if I cut out any
interface with #, I will get what I want
But # doesn't work...
maybe if I cut out any interface with 2 in it?
this doesn't cut out anything that matches Intel, I assume something to
do with the /
I can isolate "Intel(R) PRO/1000 MT Network Connection #2"
/check_command check_snmp_int!"Intel(R) PRO/1000 MT Network Connection" /check_command check_snmp_int!"1000 MT Network Connection"
I can use "^Intel" to get Intel at the beginning
Since ^ works, I figured $ would work as well. $ does not seem to work
to match at the end, and it returns with 2 $?
\Z does not work
I am at a loss for what to do. There seems to be an issue with #, and $. Anyone have a solution to this? I have 15 servers with this issue. Thanks in advance, Jason Woodward This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null Received on Tue Jun 26 10:45:31 2007 This archive was generated by hypermail 2.1.8 : Tue Jun 26 2007 - 10:50:03 EDT |
||||||||||
|
|||||||||||