When did my Linux last reboot

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

When did my Linux last reboot

Post by JohnFLi »

My google-fu is not working well today.

I have the uptime on windows working well (thank you to people on the forum here) using the $USER1$/check_ncpa.py.

Now I'd like to do that for my Linux machines.

Nothing major or fancy....just want to know how long its been since the last time it booted.

Thank you
Everybody is somebody else’s weirdo
swolf

Re: When did my Linux last reboot

Post by swolf »

Hi @JohnFLi, thanks for reaching out.

Luckily for you this will be pretty similar on both Windows and Linux. It looks like Cody had you install NCPA on your Windows servers - you can use exactly the same agent on most distributions of Linux - see here for download links. From there, you should be able to configure the same command and get the same results.

Hopefully this helps - please let me know if you run into any further issues.

-Sebastian
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: When did my Linux last reboot

Post by JohnFLi »

awesome, I did not even think about installing teh same client (linux version).
I will give it a try and report back
Everybody is somebody else’s weirdo
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: When did my Linux last reboot

Post by JohnFLi »

Ok, I am extra lame on Linux machines.

for testing, I installed the MCPA client on a test box.

Code: Select all

NAME="Rocky Linux"
VERSION="9.3 (Blue Onyx)"
different documentations all say the same thign for installing ncpa.....install seemed to go without issue

Code: Select all

 ModemManager.service               loaded active running Modem Manager
  ncpa.service                       loaded active running NCPA
  NetworkManager-wait-online.service loaded active exited  Network Manager Wait Online

Code: Select all

Nagios XI Dependencies                                                                                                                                            2.8 kB/s | 1.4 kB     00:00
Package ncpa-3.0.1-latest.x86_64 is already installed.
I try to add it in XI using the linux wizard can't get past the beginning

Code: Select all

Unable to contact server at https://servername:5693/testconnect/?token=mytoken
I made sure the ncpa.cfg file has the entry of: community_string = mytoken
Everybody is somebody else’s weirdo
gwesterman
Posts: 269
Joined: Wed Aug 23, 2023 11:29 am

Re: When did my Linux last reboot

Post by gwesterman »

Hi @JohnFli,

If you haven't, I would make sure that you correctly configured your firewall. The instructions to do so begin on page 16 of this document. Let us know if it still isn't working.

Thank you!
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: When did my Linux last reboot

Post by JohnFLi »

Yes, the firewall was it.

Thank you.

Now back to the regular testing with uptime. ;)
Everybody is somebody else’s weirdo
gwesterman
Posts: 269
Joined: Wed Aug 23, 2023 11:29 am

Re: When did my Linux last reboot

Post by gwesterman »

Glad I could help, and good luck with your testing!

Thank you!
Locked