Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gdelpierre/a8db557efdb08496da67de7d2ff7e11f to your computer and use it in GitHub Desktop.
Save gdelpierre/a8db557efdb08496da67de7d2ff7e11f to your computer and use it in GitHub Desktop.
Nrpe nagios check_file_age : file not found
Issue: Check_file_age fails to stat file located to /var/tmp/ or /tmp
OS: debian 9
init system: systemd
nagios plugin: check_file_age
Problem: Icinga returns `FILE_AGE CRITICAL: File not found - /var/tmp/foo.bar`
while command runs from bash returns: `FILE_AGE OK: /var/tmp/foo.bar is 12905 seconds old and 0 bytes | age=12905s;46800;50400 size=0B;0;0;0`
solution:
Put `false` to option `PrivateTmp`[1] on file `/etc/systemd/system/multi-user.target.wants/nagios-nrpe-server.service`
[1] https://www.freedesktop.org/software/systemd/man/systemd.exec.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment