Hi ,
Do we have a macro for getting Operating system ?
I could not find it in https://assets.nagios.com/downloads/nag ... olist.html
Marco for Operating system
Marco for Operating system
Regards,
Ranjit W
Ranjit W
Re: Marco for Operating system
We don't have a macro for this. In what context are you looking to get the OS? If it's a script you can use some bash/shell tricks on most OSes to get this.
Former Nagios employee
Re: Marco for Operating system
Hi ,
I have integrated nagios with BEM as part of msend command I am sending macros and would need OS details to be sent as well .
I have integrated nagios with BEM as part of msend command I am sending macros and would need OS details to be sent as well .
Regards,
Ranjit W
Ranjit W
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Marco for Operating system
I don't know how you'd go about turning that into an env on every check autonomously. You could definitely use a custom object variable for it though, would just require maintenance.
Re: Marco for Operating system
Hi,
We have macro for host group so I have mapped the host to the relavent host group . BEM is identifying the server type based on the host group and doing further processing.
Thanks for the custom variable link but I am not getting an idea of how it can be used in our scenario . Are you suggesting to explicitily mention the OS details and assign it to custom variable ?
We have macro for host group so I have mapped the host to the relavent host group . BEM is identifying the server type based on the host group and doing further processing.
Thanks for the custom variable link but I am not getting an idea of how it can be used in our scenario . Are you suggesting to explicitily mention the OS details and assign it to custom variable ?
Regards,
Ranjit W
Ranjit W
Re: Marco for Operating system
Being used as a macro, you will almost certainly need to hard-code the OS into a custom variable and use that macro. The difficulty arises from the fact that there is not a great way to tell what OS a remote machine is in an automated fashion, with a great degree of accuracy. You can get some guesses, but that relies on scanning for ports and seeing how the machine responds, which would be heavy if needed on-demand. The hostgroup trick is also nice as it lets you avoid the use of custom variables, and provides more utility (since you can issue commands based on a group, but not based on custom variable contents).
Former Nagios employee
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Marco for Operating system
Alternatively you could have an operating system service and send the status output of that service in the msend command (this should be available by using an on demand macro).
I have some examples here:
http://sites.box293.com/nagios/guides/c ... ing-system
I have some examples here:
http://sites.box293.com/nagios/guides/c ... ing-system
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.