HISTORY.CGI(1)

๐Ÿ’– HISTORY.CGI(1) ๐Ÿ’–

okay bestie, gather round, because we're talking about history.cgi from the General Commands Manual and it's genuinely iconic โœจ


โœจ NAME โœจ

history.cgi โ€” the CGI program that shows you your service history, no cap ๐Ÿ‘‘


๐ŸŒธ SYNOPSIS ๐ŸŒธ

history.cgi

that's it. that's the whole synopsis. she's lowkey minimal ๐Ÿ’…


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so history.cgi gets invoked as a CGI script through the history.sh CGI wrapper โ€” that's the vibe. It gets handed a QUERY_STRING environment variable carrying these parameters:

  • HISTFILE (a Xymon service history file)
  • ENTRIES (the number of entries to show)

and then, because the Xymon version of history.cgi is extra in the best way, it also handles these non-standard parameters:

  • IP (IP address of host โ€” for display purposes only)
  • PIXELS (width of colorbar when in pixel-mode)
  • ENDTIME (when the colorbar begins, a time_t value)
  • BARSUMS (which colorbars and summaries to show)

Here's what she actually does with all that: history.cgi analyses the service history file for changes that have occurred within the past 24 hours, and builds a colorbar showing the status of the service over this period of time ๐ŸŽ€ A statistics summary is also produced, listing the amount of time for each status โ€” and those statuses are green, yellow, red, purple, blue, and clear, bestie, all six of them ๐ŸŒˆ

And finally? A summary of the last N events is given, with links to the actual event logs. obsessed.

Unlike the standard history.sh script, history.cgi provides a colorbar and statistics summaries also covering the past 1 week, 4 weeks and 1 year of data. Via links it is possible to browse the entire history of the service at the requested interval โ€” literally the whole timeline, main character energy fr fr ๐Ÿ“œ

โš ๏ธ note bestie: since the resolution of the display is limited, events may be too short to show up on a colorbar; also, the exact placement of an event may not fully match up with the time-markers. not her fault, it's just pixels ๐Ÿ’€

The graphs should correctly handle the display of months with different number of days, as well as the display of periods that involve beginning and end of Daylight Savings Time, if this occurs in your timezone. she said DST rights ๐ŸŒธ

All dates and times shown are in local time for the timezone defined on the Xymon server. periodt.


๐ŸŽ€ PARAMETERS ๐ŸŽ€

  • HISTFILE โ€” Defines the host and service whose history is presented. like, who are we even talking about here ๐Ÿ’–
  • ENTRIES โ€” The number of log-entries to show in the event log table. Default is 50; to view all log entries set this to "ALL". yes bestie, ALL of them, go feral ๐Ÿ™ˆ
  • IP โ€” The IP-address of the host. This is only used for the title of the document. purely decorative, she's just here for the aesthetic โœจ
  • PIXELS โ€” The width of the colorbar graph in pixels. If this is set to 0, a percentage-based graph will be shown, similar to the one provided by the standard history.sh script. Pixel-based graphs can have a higher resolution, but do not resize automatically to suit the size of a browser window. The default value for this parameter is defined at compile-time; 960 is a good value for displays with a 1024x768 resolution. pick your fighter ๐Ÿซถ
  • BARSUMS โ€” Defines which colorbars and summaries to show. This is a number made up from a bitmask. The 1-day graph uses the value "1"; the 1-week graph uses the value "2"; the 4-week graph uses the value "4" and the 1-year graph the value "8". To show multiple graph, add the values โ€” e.g. "6" will show the 1-week and 4-weeks graphs, whereas "15" will show all the graphs. The default is defined at compile-time. math girlies rise up ๐Ÿงฎ๐Ÿ’…
  • ENDTIME โ€” The history display by default ends with the current time. Setting the ENDTIME parameter causes it to end at the time specified โ€” this is given as a Unix "time_t" value, i.e. as the number of seconds elapsed since Jan 1 1970 00:00 UTC. time travel but make it epoch ๐Ÿ•ฐ๏ธ

๐Ÿ’… OPTIONS ๐Ÿ’…

  • --env=FILENAME โ€” Load the environment from FILENAME before executing the CGI. load her up, she's ready ๐Ÿ“

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

hosts.cfg(5), xymonserver.cfg(5)

go read those too, iykyk ๐Ÿ“š


okay that's the whole page bestie, you ate that ๐Ÿซถ this was Xymon, Version 4.3.30, dated 4 Sep 2019 โ€” mwah, love that for us ๐Ÿ’–โœจ๐ŸŒˆ

๐Ÿ“ฆ where this page comes from