Greetings everyone !!!
I'm working on a monitoring project, which includes monitoring of our components.
This includes that we check the cron output (/var/log/cron) file for each particular component.
For example: "Syncmail" is a component which needs to be monitored, for this the cron log has to be parsed to get the last run (the last time,datetime it executed) of "Syncmail" and the time it ran.
Below is the format of the cron log
Oct 15 23:00:00 msg CROND[533]: (root) CMD (/usr/local/ascripts/sende
+mail.pl -i Ticket -s db -uad > /home/message/ticket.debug)
Oct 15 23:00:00 msg CROND[536]: (message) CMD (/usr/local/ascripts/sen
+demail.pl -i Ticket -s db -uad > /home/message/ticket.debug)
Oct 15 24:10:53 msg CROND[538]: (message) CMD (/home/message/Syncmail.
+pl -i Ticket -s db -uad > /home/message/ticket.debug)
At present I'm not sure how to go about this. Please put forwad your valuable suggestions and sample code for the same
Thank you for your time
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.