BUG: NCPA Agent doesn't properly report iptables status

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.
Locked
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

BUG: NCPA Agent doesn't properly report iptables status

Post by eloyd »

There doesn't seem to be a more specific board for NCPA, so I'm posting this here.

Code: Select all

https://192.168.1.11:5693/api/service/httpd/running
That works fine:

Code: Select all

{
  "value": {
    "returncode": 0, 
    "stdout": "OK: Service httpd is running"
  }
}
But change http to iptables, and it fails, even though iptables is running:

Code: Select all

{
  "value": {
    "returncode": 2, 
    "stdout": "CRITICAL: Service iptables is stopped"
  }
}
I'm pretty sure this has to do with the fact that "service itpables status" does not return a "is running..." string, but instead returns the current results of "itpables --list" So I'm guessing NCPA's parser doesn't see the "is running" and assumes that it "is stopped." So can't check to see that iptables is running that way.

Also can't check via /api/processes, because it doesn't show up in the list!

Would love to switch all our NRPE stuff over to NCPA, but if we can't get accurate process/service information, we can't convert.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: BUG: NCPA Agent doesn't properly report iptables status

Post by hsmith »

Hey!

Do you think you would be able to post that here? It will be seen quicker by the devs that way :)
Former Nagios Employee.
me.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: BUG: NCPA Agent doesn't properly report iptables status

Post by eloyd »

Okay. Forums are always my goto spot for stuff, since I can never remember what system is tracking what software.

https://github.com/NagiosEnterprises/ncpa/issues/232
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: BUG: NCPA Agent doesn't properly report iptables status

Post by hsmith »

Thanks for posting it there, generally with the open source projects, it's best to post on GitHub, because that's what we'll end up doing anyway :)
Former Nagios Employee.
me.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: BUG: NCPA Agent doesn't properly report iptables status

Post by eloyd »

Since you didn't lock this, I'll add, "but that's what customer support is supposed to do for us!!" :-)
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: BUG: NCPA Agent doesn't properly report iptables status

Post by hsmith »

2016-06-09 15_11_38-BUG_ NCPA Agent doesn't properly report iptables status - View topic • Nagios Su.png
2016-06-09 15_11_38-BUG_ NCPA Agent doesn't properly report iptables status - View topic • Nagios Su.png (6.99 KiB) Viewed 3317 times
Locking. :)
Former Nagios Employee.
me.
Locked