SNAPSHOT.CGI(1)

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

okay bestie, gather round, because this one is genuinely iconic β€” it's snapshot.cgi, a CGI program that rebuilds the Xymon webpages to look exactly how they looked at a specific point in time. a time machine for your dashboard, fr fr. it lives in the General Commands Manual section of the Xymon fam, and it is lowkey obsessed with nostalgia. πŸ•°οΈβœ¨


✨ SYNOPSIS ✨

snapshot.cgi

that's it. that's the whole thing. no args, no flags, no drama. she just runs. πŸ’…


🌸 DESCRIPTION 🌸

so here's the vibe: snapshot.cgi gets invoked as a CGI script, and it gets there via the snapshot.sh CGI wrapper. that's the gateway, the little fairy godmother, the go-between. 🧚

once she's up, she rebuilds the Xymon web pages to the look they had at a particular point in time β€” and she figures out which point in time based upon the historical information logged about events. so like, if you logged it, she can show it. no cap.

snapshot.cgi is passed a QUERY_STRING environment variable, and inside that lil string you're gonna find these parameters:

  • mon (Start month of the snapshot)
  • day (Start day-of-month of the snapshot)
  • yr (Start year of the snapshot)
  • hour (Start hour of the snapshot)
  • min (Start minute of the snapshot)
  • sec (Start second of the snapshot)

quick rules, because there are always rules:

  • The "month" parameters must be specified as the three-letter english month name abbreviation: Jan, Feb, Mar ...
  • day must be in the range 1..31.
  • yr must be specified including century (e.g. "2003").
  • hour must be specified using a 24-hour clock. yes, 24-hour. we're not doing am/pm here, bestie.

and the actual heavy lifting? that's not even her. all of the processing involved in generating the report is done by invoking xymongen(1) with the proper --snapshot option. she's the face, xymongen is the brains. πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

  • --env=FILENAME β€” Load environment from FILENAME before executing the CGI. like, pre-game loading but for env vars. πŸ’œ
  • xymongen-options β€” All options except --env are passed on to the xymongen(1) program building the snapshot files. so literally everything else gets handed straight to xymongen, she's just the messenger. 🫢

πŸ¦‹ ENVIRONMENT VARIABLES πŸ¦‹

  • XYMONGENSNAPOPTS β€” xymongen options passed by default to the snapshot.cgi script. This happens in the snapshot.sh CGI wrapper script. (yep, the wrapper does it, not her, keep up πŸ’–)
  • XYMONHOME β€” Home directory of the Xymon server files.
  • XYMONSNAPDIR β€” Directory where generated snapshots are stored. This directory must be writable by the userid executing the CGI script, typically "www", "apache" or "nobody". Default: $XYMONHOME/www/snap/
ok real talk, that writable bit is not a suggestion, it's a requirement. if the CGI user can't write there, it's giving permission-denied realness and nobody wants that. 😭
  • XYMONSNAPURL β€” The URL prefix to use when accessing the reports via a browser. Default: $XYMONWEB/snap

⭐ SEE ALSO ⭐

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

go read xymongen(1) at minimum, that's the one doing the actual work here. iykyk. πŸ“šβœ¨


aaaand that's the whole page, bestie!! πŸŽ€ you just read a manual page and it ate. anyway β€” this lil masterpiece is brought to you by Xymon, Version 4.3.30, dated 4 Sep 2019. mwah. πŸ’…πŸ’–πŸŒˆ

πŸ“¦ where this page comes from