Monitor Sophos Firewall Through Nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
SJ04
Posts: 42
Joined: Sat Oct 17, 2015 3:14 pm

Re: Monitor Sophos Firewall Through Nagios

Post by SJ04 »

Hi @tgriep,

so i copy MY MIB file to these Location:

Code: Select all

/usr/share/snmp/mibs/
on the Nagios Server and then run the Command which you have written down.
SJ04
Posts: 42
Joined: Sat Oct 17, 2015 3:14 pm

Re: Monitor Sophos Firewall Through Nagios

Post by SJ04 »

hi ,

Can you please write me Down one command for One Value.

Code: Select all

/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -o 1.3.6.1.4.1.9789.1500.1.117
,

when i use the Command I get again the Same Error like these.

Code: Select all

External command error: Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: iso.3.6.1.4.1.9789.1500.1.117
SJ04
Posts: 42
Joined: Sat Oct 17, 2015 3:14 pm

Re: Monitor Sophos Firewall Through Nagios

Post by SJ04 »

When i use -n in check_snmo command i get this Output., no matter which OID i am Using.

Code: Select all

./check_snmp -n -H 10.30.0.1 -o .1.3.6.1.4.1.9789.1500.3.82 16
SNMP OK - Timeticks: (560619050) 64 days, 21:16:30.50 |
SJ04
Posts: 42
Joined: Sat Oct 17, 2015 3:14 pm

Re: Monitor Sophos Firewall Through Nagios

Post by SJ04 »

Hi Guys,

Please Help me , I have Checked the Whole Internet but i didnt Find the Answer for my Problem.
SJ04
Posts: 42
Joined: Sat Oct 17, 2015 3:14 pm

Re: Monitor Sophos Firewall Through Nagios

Post by SJ04 »

tgriep wrote:Here is a command you use to show you the OID number and the associated description to it.

Code: Select all

snmptranslate -m /usr/share/snmp/mibs/ASTARO-MIB.txt -Tz
You can use the output to look for the OID you can use for the check_snmp commands you want.
hey ,

do you any suggestion about my last reply ?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Monitor Sophos Firewall Through Nagios

Post by Box293 »

SJ04 wrote:Hello There,

I am in trouble with monitoring the Sophos Firewall via Nagios. I have downloaded the Firewall MIB file and when i trying to get the Value of Firewall i am having this Error.

Code: Select all

/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -o .1.3.6.1.4.1.9789 1
External command error: Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: iso.3.6.1.4.1.9789
i have also copied the MIB file to SNMP/MIB directory but it still didnt work. Will be really Appricating if someone can help me out.

thanks

SJ04
I've noticed in your commands you have the OID followed by a space and then another number. This does not appear to be correctly formatted.

Normally OIDs end with a .0
If they end with a .1 then it is a reference to a table, not a value.

What is the result of these commands:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -o .1.3.6.1.4.1.9789.0
/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -o .1.3.6.1.4.1.9789.1
/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -o 1.3.6.1.4.1.9789.1500.1.117.0
/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -o 1.3.6.1.4.1.9789.1500.1.117.1
Also:
The commands you have been using will be using SNMP v1 by default. I suggest you add -P 2c to your commands.

None of your commands specify a community string, you should have something like -C public

Leave the leading period (.) off the oid

With those suggestions in mind, try these commands:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -P 2c -C public -o 1.3.6.1.4.1.9789.0
/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -P 2c -C public -o 1.3.6.1.4.1.9789.1
/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -P 2c -C public -o 1.3.6.1.4.1.9789.1500.1.117.0
/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -P 2c -C public -o 1.3.6.1.4.1.9789.1500.1.117.1
You should do a walk on the device to see what OIDs are available:

Code: Select all

snmpwalk -v 2c -c public 192.168.1.1 -O n -m all 1.3.6.1.4.1.9789
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
SJ04
Posts: 42
Joined: Sat Oct 17, 2015 3:14 pm

Re: Monitor Sophos Firewall Through Nagios

Post by SJ04 »

Box293 wrote:
SJ04 wrote:Hello There,

I am in trouble with monitoring the Sophos Firewall via Nagios. I have downloaded the Firewall MIB file and when i trying to get the Value of Firewall i am having this Error.

Code: Select all

/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -o .1.3.6.1.4.1.9789 1
External command error: Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: iso.3.6.1.4.1.9789
i have also copied the MIB file to SNMP/MIB directory but it still didnt work. Will be really Appricating if someone can help me out.

thanks

SJ04
I've noticed in your commands you have the OID followed by a space and then another number. This does not appear to be correctly formatted.

Normally OIDs end with a .0
If they end with a .1 then it is a reference to a table, not a value.

What is the result of these commands:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -o .1.3.6.1.4.1.9789.0
/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -o .1.3.6.1.4.1.9789.1
/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -o 1.3.6.1.4.1.9789.1500.1.117.0
/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -o 1.3.6.1.4.1.9789.1500.1.117.1
Also:
The commands you have been using will be using SNMP v1 by default. I suggest you add -P 2c to your commands.

None of your commands specify a community string, you should have something like -C public

Leave the leading period (.) off the oid

With those suggestions in mind, try these commands:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -P 2c -C public -o 1.3.6.1.4.1.9789.0
/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -P 2c -C public -o 1.3.6.1.4.1.9789.1
/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -P 2c -C public -o 1.3.6.1.4.1.9789.1500.1.117.0
/usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -P 2c -C public -o 1.3.6.1.4.1.9789.1500.1.117.1
You should do a walk on the device to see what OIDs are available:

Code: Select all

snmpwalk -v 2c -c public 192.168.1.1 -O n -m all 1.3.6.1.4.1.9789
@Box293,
I have Tried as you have suggested but I am Again getting the Somehow the Same Error.

Code: Select all

snmpwalk -v 2c -c public 192.168.1.1 -O n -m all .1.3.6.1.4.1.9789.1500.2.31                           
  .1.3.6.1.4.1.9789.1500.2.31 = No Such Object available on this agent at this OID
Thank you for your Time
SJ04
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Monitor Sophos Firewall Through Nagios

Post by rkennedy »

Can you run the exact command @Box293 mentioned?

Code: Select all

snmpwalk -v 2c -c public 192.168.1.1 -O n -m all 1.3.6.1.4.1.9789
Additionally - can you please post the output to the other 8 commands mentioned?
Former Nagios Employee
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Monitor Sophos Firewall Through Nagios

Post by tgriep »

One more thing to do, create a file in this folder

Code: Select all

/etc/snmp
called

Code: Select all

snmp.conf
Add this line to that file

Code: Select all

mibs +ALL
This will ensure that all of the snmp commands you run will search all of the files in the /usr/share/snmp/mibs/ folder.

Did you copy the MIB file to that folder?
Can you run the following command and post the output?

Code: Select all

ls -l /usr/share/snmp/mibs/
Be sure to check out our Knowledgebase for helpful articles and solutions!
SJ04
Posts: 42
Joined: Sat Oct 17, 2015 3:14 pm

Re: Monitor Sophos Firewall Through Nagios

Post by SJ04 »

tgriep wrote:One more thing to do, create a file in this folder

Code: Select all

/etc/snmp
called

Code: Select all

snmp.conf
Add this line to that file

Code: Select all

mibs +ALL
This will ensure that all of the snmp commands you run will search all of the files in the /usr/share/snmp/mibs/ folder.

Did you copy the MIB file to that folder?
Can you run the following command and post the output?

Code: Select all

ls -l /usr/share/snmp/mibs/
Hi ,

I have created the snmp.conf file and added the command but it still didnt work
Attachments
mibs.txt
(4.01 KiB) Downloaded 341 times
Locked