SHOWGRAPH.CGI(1)

πŸ’– SHOWGRAPH.CGI(1) πŸ’–

okay bestie, pull up a chair, because today we're learning about showgraph.cgi β€” a whole CGI script whose entire job is making Xymon trend graphs pop off. it lives in section 1 of the manual (you know, the general commands manual) and honestly? she's iconic. ✨


✨ SYNOPSIS ✨

showgraph [options]

🌸 DESCRIPTION 🌸

so the tea is: showgraph.cgi doesn't just walk in the front door, no ma'am. she gets invoked as a CGI script through the showgraph.sh CGI wrapper. that's the whole entrance situation. πŸŽ€

and how does she know what you want? she gets handed a QUERY_STRING environment variable stuffed with the following parameters, and she reads them like a group chat she's been waiting all day to reply to:

  • host β€” the name of the host you want a graph for. like, whose graph are we making, babe?
  • service β€” the name of the service you want a graph for.
  • disp β€” the display-name of the host. this is what actually shows up on the generated graphs instead of the hostname. cute nickname energy, lowkey.
  • graph β€” can be "hourly", "daily", "weekly" or "monthly", and it picks the time period the graph covers. choose your era. ⏰
  • first β€” used to split multi-graphs into multiple graphs. this makes showgraph.cgi generate only the graphs starting with the "first"th graph and continuing for "count". yes, the original really does put "first" and "count" in quotes like that, we respect the lore. πŸ“š
  • count β€” the number of graphs in a multi-graph. how many are we serving today.
  • upper β€” sets the upper limit of the graph. peep rrdgraph(1) for the description of the -u option.
  • lower β€” sets the lower limit of the graph. peep rrdgraph(1) for the description of the -l option.
  • graph_start β€” sets the starttime of the graph. this one is used in zoom-mode. πŸ”
  • graph_end β€” sets the end-time of the graph. also zoom-mode coded.
  • action=menu β€” generates an HTML page with links to 4 graphs, representing the hourly, weekly, monthly and yearly graphs. and get this β€” it doesn't actually generate any graphs at all, just the HTML that links to them. she's a connector, not a maker. πŸ’…
  • action=selzoom β€” generates an HTML page with a link to a single graph, plus JavaScript code that lets the user select part of the graph for a zoom-operation. the JavaScript then invokes showgraph.cgi with "action=showzoom" to generate the zoomed graph webpage. nesting dolls but make it graphs.
  • action=showzoom β€” generates HTML with a link to the zoomed graph image. that link goes to an "action=view" invocation of showgraph.cgi.
  • action=view β€” generates a single graph image. that's it, that's the one. ✨

πŸ‘‘ OPTIONS πŸ‘‘

  • --config=FILENAME β€” loads the graph configuration file from FILENAME. if you don't specify one, the file $XYMONHOME/etc/graphs.cfg gets used instead. wanna know all about that file? check graphs.cfg(5), it spills everything. πŸ“„
  • --env=FILENAME β€” loads the environment settings defined in FILENAME before executing the CGI. get dressed before you go out, basically. 🧚
  • --rrddir=DIRECTORY β€” the top-level directory for the RRD files. if you don't specify it, the directory given by the XYMONRRDS environment gets used. home is wherever the RRDs are. 🏠
  • --save=FILENAME β€” instead of returning the image via the CGI interface (i.e. on stdout), it saves the generated image to FILENAME. no stage fright, just file it away. πŸ’Ύ
  • --debug β€” enable debugging output. turn the mic on, bestie. 🎀

🌈 ENVIRONMENT 🌈

  • QUERY_STRING β€” provided by the webserver CGI interface, this is the thing that decides what graph gets generated. she's the main character of the env vars, no cap. πŸ‘‘
  • RRDGRAPHOPTS β€” RRD-specific options for the graph. this is usually set in the xymonserver.cfg(5) file.

πŸ¦‹ FILES πŸ¦‹

  • graphs.cfg β€” the configuration file determining how graphs are generated from RRD files. the blueprint, the vision board, the whole plan. πŸ“‹

⭐ SEE ALSO ⭐


and that's the whole page, bestie β€” go forth and graph. this was Xymon, Version 4.3.30: 4 Sep 2019, and honestly? she ate. periodt. πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from