James wrote: > I am using the $LASTHOSTUP$ macro but it displays a timestamp in time_t > format. > I need to convert it to seconds. > > Time since last UP: 1218979837 > The $LAST[HOST|SERVICE]*$ macros all use time_t they're the basis of inter-process communication via the command_file: [1219093171.497486] [001.0] [pid=16669] remove_event() [1219093171.497502] [064.1] [pid=16669] Making callbacks (type 8)... [1219093171.497517] [001.0] [pid=16669] reschedule_event() [1219093171.497559] [001.0] [pid=16669] add_event() [1219093171.497604] [064.1] [pid=16669] Making callbacks (type 8)... [1219093171.497662] [064.1] [pid=16669] Making callbacks (type 19)..
If you're set on using it, you're stuck using a wrapper script (or very creative command line-fu) to do the conversion. Otherwise, I'd look into using $HOSTDURATIONSEC$ instead, which is the seconds since the last state change. Sean McAfee System Engineer Collaborative Fusion, Inc. [EMAIL PROTECTED] 412-422-3463 x 4025 5849 Forbes Avenue Pittsburgh, PA 15217 **************************************************************** IMPORTANT: This message contains confidential information and is intended only for the individual named. If the reader of this message is not an intended recipient (or the individual responsible for the delivery of this message to an intended recipient), please be advised that any re-use, dissemination, distribution or copying of this message is prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. **************************************************************** ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null