I need a check for the first 2 lines of the 5 last xml files
Posted: Mon Feb 24, 2014 4:10 am
Hello all,
I'm looking for a nagios XI check plugin that displays the first 2 lines of the last 5 xml files in a folder that might contain hundreds of xml files. I could check the file age and count if they are cleaned daily, but unfortunately they aren't cleaned daily.
In the xml files a time stamp of the schedule xml file is displayed but in that folder ALL xml files remain in that folder. So over a few years hundreds of files will remain in that folder.
I'm not a script-er so I really don't know where to begin. And after looking and searching through the exchange library I couldn't find a suitable plugin.
Is there someone that needed something similar? Or is someone very handy to alter an existing, or create a simple new one?
Thank you so much.
I'm looking for a nagios XI check plugin that displays the first 2 lines of the last 5 xml files in a folder that might contain hundreds of xml files. I could check the file age and count if they are cleaned daily, but unfortunately they aren't cleaned daily.
In the xml files a time stamp of the schedule xml file is displayed but in that folder ALL xml files remain in that folder. So over a few years hundreds of files will remain in that folder.
I'm not a script-er so I really don't know where to begin. And after looking and searching through the exchange library I couldn't find a suitable plugin.
Is there someone that needed something similar? Or is someone very handy to alter an existing, or create a simple new one?
Thank you so much.