Setup Switchvox OID's in serivces

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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Setup Switchvox OID's in serivces

Post by abrist »

The syntax on the threshold is wrong as you suspected. To generate a critical when the value is less than 3, try the following syntax:

Code: Select all

-c 3:
More information about the threshold syntax can be found at:
https://www.nagios-plugins.org/doc/guid ... HOLDFORMAT
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
nhajicostis
Posts: 17
Joined: Mon Dec 09, 2013 10:15 am

Re: Setup Switchvox OID's in serivces

Post by nhajicostis »

Thanks for that, would I assume then that -c :5 would do greater than 5 as a critical as well
nhajicostis
Posts: 17
Joined: Mon Dec 09, 2013 10:15 am

Re: Setup Switchvox OID's in serivces

Post by nhajicostis »

Hope everyone had a good Christmas, I tried the -c 3: argument to set a critical threshold for less than 3 and I still get an OK when my value is 2 on my status,
This is the full command
check_command check_snmp!-C public -o SWITCHVOX-MIB::svoxAvailableVoipProviders -c 3:
The way I interpret this command is to check SNMP on the given OID and to give a critical if the value is under 3. Am I missing anything else for this to work?

Any help would be greatly appreciated thanks

Nick Hajicostis
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Setup Switchvox OID's in serivces

Post by abrist »

The "-c :3" syntax is correct. Can you show us the output of running the command from the cli?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
nhajicostis
Posts: 17
Joined: Mon Dec 09, 2013 10:15 am

Re: Setup Switchvox OID's in serivces

Post by nhajicostis »

After some more changes, I added a contact group to my host and the value went critical. I have adjusted my critical to the values of my PBX, so that is fixed now, thanks for the help.

I still have one problem, none of my remote locations are sending back SNMP responses, only the PBX on my local network is responding.
If I try to use the snmpget command I always get a timeout for any remote PBX, I have opened port 161 on my local router and used a static NAT to point it to the SNMP server IP, on one of the remote sites I have access to the router on site I have opened port 161 and pointed it to the PBX on its local network but still get on response, any suggestions on what could be the problem, the PBX is set exactly like the one on my local network, would the fact that I used the public community string have anything to do with it.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Setup Switchvox OID's in serivces

Post by abrist »

SNMP packets are most likely filtered on public networks. Do you have a private connection (vpn,tunnel,etc) to the remote boxes?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
nhajicostis
Posts: 17
Joined: Mon Dec 09, 2013 10:15 am

Re: Setup Switchvox OID's in serivces

Post by nhajicostis »

I have VPN for a few but not all, on one of the sites I have a watchguard router, in the syslog I can see the SNMP packets making it into the system, I do not see any traffic going back to my location, I have VPN for that one, I will setup the VPN and see if I can read it after.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Setup Switchvox OID's in serivces

Post by abrist »

Great, keep us posted. We will be out of the office until Thursday due to the new year holiday, so it may be a few days for a response.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
nhajicostis
Posts: 17
Joined: Mon Dec 09, 2013 10:15 am

Re: Setup Switchvox OID's in serivces

Post by nhajicostis »

I tried the VPN connection and it gives back a response, now can i specify VPN info in the check_snmp command, since once I connect the VPN i am only in that network
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Setup Switchvox OID's in serivces

Post by abrist »

Well, you would specify the ip address of the remote server. Your vpn config should include a route to that network. Otherwise, you may need a custom wrapper script if you are not always connected to the vpn. (you will also need to make sure that you do not have any subnet collisions in your routing setup)
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked