From 593d66423cc042bab54bff1d2cb03730620658ac Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 18 Apr 2025 17:54:12 +0200 Subject: [PATCH] [disk/file_age] Add support for host_name --- plugins/disk/file_age | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/disk/file_age b/plugins/disk/file_age index 09e12634..991de76d 100755 --- a/plugins/disk/file_age +++ b/plugins/disk/file_age @@ -51,6 +51,9 @@ case $1 in echo 'graph_vlabel seconds' echo 'graph_category disk' + if [ -n "$host_name" ]; then + echo "host_name $host_name" + fi exit 0 ;; esac @@ -91,6 +94,8 @@ Since there is no way for the plugin to guess which files you want monitored, yo [file_age] user root # May not be necessary, depending on which files you want monitored. + env.host_name backup # Optional to group chart under a different host + env.file1_path /var/log/syslog # Mandatory, complete path to file. env.file1_label System syslog # Optional label if you don't want the file name to be displayed. env.file1_warning 86400 # Optional warning level. Measured in seconds. 86400 is one day of seconds.