Page 1 of 1
Nagios logging in windows event format
Posted: Mon Nov 17, 2014 6:26 pm
by cpetrus
Hi all,
Is it possible to set Nagios to log the data in windows event format?
Thanks
Best regards,
CPetrus
Re: Nagios logging in windows event format
Posted: Tue Nov 18, 2014 10:36 am
by slansing
So what you are asking, is if you can change the nagios.log file to handle event ID's, tree's, categorys, sources, etc? No, I'm sorry, that is not really possible. I'm not sure why you would want to do this, perhaps if you share your reasoning, we might be able to help find you a solution in some other manner.
Re: Nagios logging in windows event format
Posted: Tue Nov 18, 2014 12:22 pm
by cpetrus
Not necessarily changing nagios log. It could be for example additional logging which will generate windows log event format.
I need it to integrate with ECS monitoring solution. As far as I know it is processing only windows log event files (maybe it can process different format but I am aware only about it).
Re: Nagios logging in windows event format
Posted: Tue Nov 18, 2014 6:07 pm
by slansing
So you are trying to monitor Nagios with another application? Why not do it the other way around, since you will have to come up with some scripted solution that would copy out the nagios log and run some sort of parse and build on it. That is not really something we can help with. From the looks of it, ECS is not a infrastructure monitoring solution, it is a tool for monitoring pipe corrosion? Correct me if I'm wrong, but that is typically something which you would check from Nagios or send results up to Nagios passively, not the other way around.
Re: Nagios logging in windows event format
Posted: Wed Nov 19, 2014 7:10 am
by cpetrus
It needs to be done in this way

Maybe some bash script to analyze the log and create new one in windows event format?
But how to interpret these numbers (for example: [1416346326] ) and convert to date and time ?
Regards,
CPetrus
Re: Nagios logging in windows event format
Posted: Wed Nov 19, 2014 8:55 am
by rhassing
If you create a bash script you could do the follwing:
The output is:
Re: Nagios logging in windows event format
Posted: Wed Nov 19, 2014 1:58 pm
by slansing
Yep, you'd need to script a solution to do it as mentioned, the numbers you are looking at are in unix timestamp format. You still have not yet answered the question though, of how deep into the windows event log format you are looking to translate. If you are just having trouble reading timestamps, that is easy enough, and definitely not restricted to "windows event format."
Re: Nagios logging in windows event format
Posted: Thu Nov 20, 2014 10:16 am
by cpetrus
great
thank you very much both. You saved me and make my live easy
Best regards,
CPetrus