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... daymust be in the range1..31.yrmust be specified including century (e.g."2003").hourmust 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 fromFILENAMEbefore executing the CGI. like, pre-game loading but for env vars. πxymongen-optionsβ All options except--envare passed on to thexymongen(1)program building the snapshot files. so literally everything else gets handed straight toxymongen, she's just the messenger. π«Ά
π¦ ENVIRONMENT VARIABLES π¦
XYMONGENSNAPOPTSβ xymongen options passed by default to thesnapshot.cgiscript. This happens in thesnapshot.shCGI 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
- debian bookworm: xymon 4.3.30-1+b2 Β· GPL-2.0-only WITH OpenSSL exception
- debian trixie: xymon 4.3.30-4 Β· GPL-2.0-only WITH OpenSSL exception
- ubuntu jammy: xymon 4.3.30-1build2 Β· GPL-2.0-only WITH OpenSSL exception
- ubuntu jammy: xymon 4.3.30-1ubuntu0.1 Β· GPL-2.0-only WITH OpenSSL exception
- ubuntu noble: xymon 4.3.30-2build3 Β· GPL-2.0-only WITH OpenSSL exception
- ubuntu noble: xymon 4.3.30-2ubuntu0.1 Β· GPL-2.0-only WITH OpenSSL exception
- ubuntu questing: xymon 4.3.30-4
- ubuntu resolute: xymon 4.3.30-5 Β· GPL-2.0-only WITH OpenSSL exception
- ubuntu stonking: xymon 4.3.30-6 Β· GPL-2.0-only WITH OpenSSL exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms