Skip to content
Snippets Groups Projects
Commit a4ba462e authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

check_snmp_data: add IML header in help

parent e1cabb81
No related branches found
No related tags found
1 merge request!296Simple task/7546 icinga check für ablaufende gitlab tokens
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
# 2022-10-25 v0.6 <axel.hahn@unibe.ch> fix empty value in performance data; shell fixes # 2022-10-25 v0.6 <axel.hahn@unibe.ch> fix empty value in performance data; shell fixes
# 2023-05-05 v0.7 <axel.hahn@unibe.ch> source shared func, support snmpv3; add synoio # 2023-05-05 v0.7 <axel.hahn@unibe.ch> source shared func, support snmpv3; add synoio
# 2023-05-16 v0.8 <axel.hahn@unibe.ch> add about for general infos and without perf data # 2023-05-16 v0.8 <axel.hahn@unibe.ch> add about for general infos and without perf data
# 2025-02-12 v1.0 <axel.hahn@unibe.ch> add IML header in help
# ====================================================================== # ======================================================================
. $(dirname $0)/inc_pluginfunctions . $(dirname $0)/inc_pluginfunctions
...@@ -77,7 +78,7 @@ ...@@ -77,7 +78,7 @@
# --- basic vars # --- basic vars
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=0.8 self_APPVERSION=1.0
METHOD="" METHOD=""
...@@ -160,18 +161,11 @@ function showHelp(){ ...@@ -160,18 +161,11 @@ function showHelp(){
do do
METHOD=$(echo "$line" | cut -f 2 -d ":") METHOD=$(echo "$line" | cut -f 2 -d ":")
descr=$(_cfg_getlabel) descr=$(_cfg_getlabel)
printf " %-10s %-50s\n" "$METHOD" "$descr" printf " %-10s %-50s\n" "$METHOD" "$descr"
done done
) )
cat <<EOH cat <<EOH
______________________________________________________________________ $( ph.showImlHelpHeader )
$self_APPNAME
v$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
SNMP performance data of Synology storages. SNMP performance data of Synology storages.
...@@ -187,10 +181,10 @@ PARAMETERS: ...@@ -187,10 +181,10 @@ PARAMETERS:
-f FILE -f FILE
read authentication from config file read authentication from config file
default: "/etc/icinga2/snmp.cfg" default: "/etc/icinga2/snmp.cfg"
-m method what to show -m METHOD
method is one of ... what to show; METHOD is one of ...
$_methods $_methods
-v verbose output -v verbose output
CONFIG FILE: CONFIG FILE:
The config file can be multiline and has the syntax The config file can be multiline and has the syntax
......
#!/bin/sh #!/bin/sh
# ======================================================================
#
# Include file for SNMP related checks
# Used by
# - check_snmp_data
# - check_snmp_printer
# - check_snmp_synology
#
# ======================================================================
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Variables # Variables
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment