Check Multiple ip for a given host and using active one to d
Posted: Wed Nov 06, 2019 9:44 am
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.
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.