MRTG-WEBSERVER(1)

πŸ“¦
version 2.17.10 Β· 2 versions
  • 2.17.10 Β· alpine 3.22, alpine 3.23, alpine 3.24, centos-stream 10, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 2.17.7 Β· centos-stream 9
, in alpine 3.22, alpine 3.23, alpine 3.24, centos-stream 10, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– MRTG-WEBSERVER πŸ’–

okay so bestie, welcome to the mrtg-webserver manual page (that's section 1, from the mrtg manual suite, iykyk) 🫢


✨ NAME ✨

mrtg-webserver β€” hints for web server configuration πŸŽ€


🌸 SYNOPSIS 🌸

so like, if you want people to actually see the results of your network monitoring efforts, you will need a webserver. no webserver, no graphs, no slay. πŸ’…

This document lists some configuration hints for webservers. Contributions welcome. πŸ‘‘ (yes fr, they literally said contributions welcome, come thru)


πŸ¦‹ APACHE πŸ¦‹

πŸ“ Configuring mod_expire πŸ“

A big issue with mrtg monitoring data is the expiry time. All these nice graphs you can create are only valid for a short time. If you do not take special action some webbrowsers will not notice this and you may end up with people seeing old data because of caching issues. not the stale-graph jumpscare 😭

The apache module mod_expire allows you to setup special expiry properties for individual file.

Here is an example for how this may look for an mrtg web directory. The configuration directives can be stored into a .htaccess file.

############################################################
# Example .htaccess for use with apache-1.2 and mod_expire.
# (mod_expire come with apache-1.2 but you have to explicitly
# activate it when compiling the httpd ...)
#############################################################
#
<Files "*-day.png">
ExpiresActive On                  # enable expirations
# five minutes
ExpiresDefault M300
</Files>

<Files "*-week.png">
ExpiresActive On
ExpiresDefault M1800
</Files>

<Files "*-month.png">
ExpiresActive On
ExpiresDefault M7200
</Files>

<Files "*-year.png">
ExpiresActive On
ExpiresDefault M86400
</Files>

<Files "*.html">
ExpiresActive On
ExpiresDefault M300
</Files>

# index.html is not automatically generated
<Files "index.html">
ExpiresActive Off
</Files>
heads up bestie: the comment in that config block is doing the Lord's work β€” index.html is not automatically generated, which is exactly why it gets ExpiresActive Off. the way that file needs special treatment… iconic but also a little unhinged πŸ™ˆ

🧚 AUTHOR 🧚

Unknown πŸ’€ (literally nobody signed it, the mystery of it all)


and that's the whole page, periodt ✨

this was version 2.17.10 of the page, dated 2022-01-19, sitting pretty under the mrtg banner β€” ty for reading my little manpage rant, mwah πŸ’–