[hobbit] Remedy Ticketing

Hubbard, Greg L greg.hubbard at eds.com
Fri Aug 25 19:58:42 CEST 2006


Matt, I think that is a configuration option.  One of the Hobbit
improvements was moving the history stuff into memory and out of flat
files.  But I think I remember an option that would make Hobbit write
out the history logs like BB did.

GLH 

-----Original Message-----
From: Epp, Matthew Contractor PEO EIS AKO
[mailto:matthew.epp at us.army.mil] 
Sent: Friday, August 25, 2006 12:17 PM
To: 'hobbit at hswn.dk'
Subject: RE: [hobbit] Remedy Ticketing

> I'm slightly confused about what you did. The *current* status page 
> (which is where you have a "History" button) doesn't have a "timebuf"
> value, because it's just the current status - and it might not be 
> logged in the historical logs directory.

In the old Big Brother system, $BBVAR/logs contained a file for every
current status page. So, in the dohostsvc.c I did:

logtime = (char *) getenv("LOGTIME");

Then the cgi script checked to see if it was a current page or a
historical
one:  ($TIMEBUF is the value of logtime passed to the cgi script) 

    if [ "$TIMEBUF" != "LOGTIME_not_set" ]; then
 
      HOSTLOG=`echo $HOST | $SED 's/,/_/g'`
 
      # get the color of the status from the status file
      set `$CAT "$BBHISTLOGS/$HOSTLOG/$SERVICE/$TIMEBUF" | $HEAD -1`
>/dev/null 2>&1
      BKG="$1"
      # Grab the status page from histlogs
      ALERTDATA=`$CAT $BBHISTLOGS/$HOSTLOG/$SERVICE/$TIMEBUF`
    else
      # Grab the current status page
      set `$CAT "$BBLOGS/$HOSTSVC" | $HEAD -1` >/dev/null 2>&1
      BKG="$1"
 
      ALERTDATA=`$CAT $BBLOGS/$HOSTSVC`
    fi
 
> On the other hand, a *historical* status log page doesn't have a 
> "History" button because ... well, you're already looking at history.
> 
> If you can work it out yourself, then you probably need the "logtime"
> parameter for the generate_html_log() routine. This has the Unix 
> timestamp of the log entry. If you need to convert the timestamp into 
> the filename format used by the historical logs,
"histlogtime(timestamp);"
> will return a string with the correct formatting of the timestamp.

Does a current status page get saved anywhere to a file in Hobbit like
Big Brother did? I need some way to pass the data to the cgi script for
parsing.


To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk





More information about the Xymon mailing list