Couple of post migration issues

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bcamp
Posts: 30
Joined: Thu May 23, 2013 2:54 pm

Couple of post migration issues

Post by bcamp »

Hey guys. Been playing with the new version all night. I'm really liking the update so far. I've run into two problems that I haven't been able to figure out on my own.

Problem 1 - I saw someone else with a similar issue, the response there was he may have found a bug. My Network Outages dashlet is listing my Nagios host, although it says state is Up. I have no idea where it's getting that duration from. I just rebooted the Nagios server yesterday after a kernel update. The number of hosts and services affected is everything I'm monitoring in Nagios. At the time I took the screenshot, we had no hosts or services with any problems.
outages (1).png
Problem 2 - The domain expiration check is spotty with its results. Some domains are correctly checked and reported, while others error out somewhere and Nagios reports the expiration date as 1969. For example

Code: Select all

[brian@nagios libexec]$ ./check_domain.sh -d nagios.com
OK - Domain nagios.com will expire in 354 days (2015-05-03).
Works fine. When I try it on our domains, I get an error

Code: Select all

[brian@nagios libexec]$ ./check_domain.sh -d psd.ms
CRITICAL - Domain psd.ms expired on Wed, 31 Dec 1969 18:00:00 -0600

Code: Select all

[brian@nagios libexec]$ ./check_domain.sh -d pascagoulaschools.org
CRITICAL - Domain pascagoulaschools.org expired on Wed, 31 Dec 1969 18:00:00 -0600
The check_domain script says it uses Whois for the info, which is working correctly from this machine.

Code: Select all

[brian@nagios libexec]$ whois psd.ms
[Querying whois.nic.ms]
[whois.nic.ms]
Domain Name: psd.ms
Domain ID: 53161-CoCCA
WHOIS Server: whois.nic.ms
Referral URL:
Updated Date: 2010-01-22T19:17:11.172Z
Creation Date: 2009-01-22T14:08:34.688Z
Registry Expiry Date: 2015-01-22T14:08:34.678Z
and

Code: Select all

[brian@nagios libexec]$ whois pascagoulaschools.org
[Querying whois.publicinterestregistry.net]
[whois.publicinterestregistry.net]
Domain Name:PASCAGOULASCHOOLS.ORG
Domain ID: D106715359-LROR
Creation Date: 2005-06-24T19:54:16Z
Updated Date: 2014-03-17T14:33:38Z
Registry Expiry Date: 2018-06-24T19:54:16Z

Any help with these is greatly appreciated. Thank you.
You do not have the required permissions to view the files attached to this post.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Couple of post migration issues

Post by sreinhardt »

I have not had a chance to look at the network outages item, but I did just speak with a developer about the domain expiration plugin issues, and he is taking a look now.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
bcamp
Posts: 30
Joined: Thu May 23, 2013 2:54 pm

Re: Couple of post migration issues

Post by bcamp »

Thank you.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Couple of post migration issues

Post by lmiltchev »

You are welcome!

FYI, we have an internal bug report filed on Network Outages (TASK ID 2819). We will let you know when this is resolved.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Couple of post migration issues

Post by sreinhardt »

Our developer entirely rewrote the plugin to work with any registrar that supports the major expiration date identification tags. Give the attached wizard an upload and test if you would.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
bcamp
Posts: 30
Joined: Thu May 23, 2013 2:54 pm

Re: Couple of post migration issues

Post by bcamp »

I'm very sorry for the delay in replying. I didn't realize there had been another update to this thread. I'll need to check my settings and see if I can be alerted by email for updates.

Anyway- Can confirm problem 1 has been resolved with R1.1. Thank you!

Problem 2- The re-write of the plugin is almost working correctly. Here's what I'm getting with the new version.

Code: Select all

[brian@nagios libexec]$ ./check_domain.php -d psd.ms -w 40 -c 10
CRITICAL - Domain psd.ms will expire in 231 days (2015-01-22T14:08:34.678Z).
It's correctly identifying the date the domain will expire, 2015-01-22 is the correct information there. The only problem with it is that it's returning a critical instead of ok, unless I'm misunderstanding how it's supposed to work. I wouldn't expect a critical to be returned unless we're <10 days away from expiration. I was playing around with it a little bit, I'll post some of my results below.

Code: Select all

[brian@nagios libexec]$ ./check_domain.php -d psd.ms -w 40 -c 240
WARNING - Domain psd.ms will expire in 231 days (2015-01-22T14:08:34.678Z).

Code: Select all

[brian@nagios libexec]$ ./check_domain.php -d psd.ms -w 250 -c 240
OK - Domain psd.ms will expire in 231 days (2015-01-22T14:08:34.678Z).
I know my warn/crit values are backwards in the last one, that was just me playing around with it. You can see that it's returning OK when the expire value is inside the thresholds, and a warn/crit when outside of the thresholds. I'd expect it behave in the opposite manner. Unless I'm missing something, which is very possible. I determined the new plugin was using check_domain.php instead of check_domain.sh from the service definition after I created the service check in the wizard. I hope I'm using that's the right command file to run for my examples above.

Thank you!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Couple of post migration issues

Post by slansing »

With just basic warning and critical thresholds it works this way:

You have critical set to 240, that means, that if there are less than 240 days remaining on the lease that it will trigger a crit state change. The same goes for warning, with this check, it goes something like -

If 'int remaining' < threshold, then trigger change to threshold state (warning or critical).
bcamp
Posts: 30
Joined: Thu May 23, 2013 2:54 pm

Re: Couple of post migration issues

Post by bcamp »

slansing wrote:With just basic warning and critical thresholds it works this way:

You have critical set to 240, that means, that if there are less than 240 days remaining on the lease that it will trigger a crit state change. The same goes for warning, with this check, it goes something like -

If 'int remaining' < threshold, then trigger change to threshold state (warning or critical).

Right, that's how I was thinking it should work. Your explanation was much clearer than mine. If you take a look at that first check I ran

Code: Select all

[brian@nagios libexec]$ ./check_domain.php -d psd.ms -w 40 -c 10
CRITICAL - Domain psd.ms will expire in 231 days (2015-01-22T14:08:34.678Z).
In this case 'int remaining' > threshold, yet a critical alert is triggered. Similarly here

Code: Select all

[brian@nagios libexec]$ ./check_domain.php -d psd.ms -w 40 -c 240
WARNING - Domain psd.ms will expire in 231 days (2015-01-22T14:08:34.678Z).
'int remaining' > warning threshold, but not critical threshold. A warning is issued. I know you wouldn't want to run a higher critical threshold than warning threshold on a real system, I was just playing around with the numbers at that point seeing how I could alter the return value.

Code: Select all

[brian@nagios libexec]$ ./check_domain.php -d psd.ms -w 250 -c 240
OK - Domain psd.ms will expire in 231 days (2015-01-22T14:08:34.678Z).
In this case, 'int remaining' < threshold, no alert triggered.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Couple of post migration issues

Post by abrist »

What version of the domain expiration wizard?
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.
bcamp
Posts: 30
Joined: Thu May 23, 2013 2:54 pm

Re: Couple of post migration issues

Post by bcamp »

Version 1.1.0 is what's listed in the admin console. It's the version sreinhardt linked earlier in this thread. I just didn't see that reply until this morning. Thanks, guys.
Locked