Check Multiple ip for a given host and using active one to d

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
StClairPublic
Posts: 6
Joined: Wed Mar 02, 2016 11:20 am

Check Multiple ip for a given host and using active one to d

Post by StClairPublic »

We are a small rural school with basically me as the IT staff. We have literally thousands of device and are using nagios to monitor as many as possible.

What I am trying to do is monitor staff laptops which when in their rooms are connected to either a docking station or port replicator which have a 10.x.x.x ip. When off either of those they would connect to the wireless with a 172.x.x.x ip. Ideally they would be on the wired ip. The question is, since either ip is statically assigned, is there a way to check one first to see if it is active and if not then check the second. And depending on which is active, that ip address would be then used to do remaining checks (ie SMART, Disk Space, etc)

I know I could do a seperate set of commands for each ip, but with 60 some laptops that would make the output rather messy. Hoping to make it so I can scan display and see what is having issue without having to look if it is one wired or wireless networks.

Hope this makes sense.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Check Multiple ip for a given host and using active one

Post by mbellerue »

Yikes! Sounds like quite the task, I wish you luck with it!

Regarding the laptops, I think the best solution for those might be passive checks with freshness checks. Give these docs a once-over and see if they spark some ideas for you. Specifically the passive checks first. Freshness won't make sense without knowing about passive checks.
https://assets.nagios.com/downloads/nag ... hecks.html
https://assets.nagios.com/downloads/nag ... hness.html

Whether or not that will be able to tell you whether the laptop is on the wired or wireless network, I can't really say. But this will definitely go a long way towards ease of setup so you can at least start monitoring.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked