Plugin Storage-QNAP-SNMP
De SLM - MediaWiki
Révision datée du 29 avril 2020 à 23:12 par Admin (discussion | contributions)
Sommaire
Plugin
/usr/lib/centreon/plugins/centreon_plugins.pl --plugin=storage::qnap::snmp::plugin
Le template d’hôte
Nous regrouperons les services dans un template dhôte
1 clapi -o HTPL -a add -v "STORAGE-QNAP-SNMP-SLM;STORAGE-QNAP-SNMP-SLM;;;;"
2 clapi -o HTPL -a addtemplate -v "STORAGE-QNAP-SNMP-SLM;generic-active-host-custom"
Cpu
1 #Création commande
2 clapi -o CMD -a ADD -v "Check_STORAGE_QNAP_SNMP_Cpu;2;\$CENTREONPLUGINS\$/centreon_plugins.pl --plugin=storage::qnap::snmp::plugin --mode=cpu --hostname=\$HOSTADDRESS\$ --snmp-version=\$_HOSTSNMPVERSION\$ --snmp-community=\$_HOSTSNMPCOMMUNITY\$ \$_HOSTEXTRAOPTIONS\$ \$_SERVICEEXTRAOPTIONS\$ --warning-average='\$_SERVICEWARNING\$' --critical-average='\$_SERVICECRITICAL\$' "
3 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Cpu;enable_shell;0"
4 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Cpu;command_activate;1"
5 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Cpu;command_locked;0"
6
7 #Création template service
8 clapi -o STPL -a add -v "Stpl_STORAGE_QNAP_SNMP_Cpu;Cpu;generic-active-service-custom"
9 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Cpu;check_command;Check_STORAGE_QNAP_SNMP_Cpu"
10 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Cpu;check_period;24x7"
11 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Cpu;max_check_attempts;3"
12 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Cpu;normal_check_interval;5"
13 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Cpu;retry_check_interval;1"
14 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Cpu;notification_period;24x7"
15 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Cpu;WARNING;80"
16 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Cpu;CRITICAL;90"
17 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Cpu;graphtemplate;CPU"
18
19 #Ajout de la template service à la template d hôte
20 clapi -o STPL -a addhost -v "Stpl_STORAGE_QNAP_SNMP_Cpu;STORAGE-QNAP-SNMP-SLM"
Memory
1 #Création commande
2 clapi -o CMD -a ADD -v "Check_STORAGE_QNAP_SNMP_Memory;2;\$CENTREONPLUGINS\$/centreon_plugins.pl --plugin=storage::qnap::snmp::plugin --mode=memory --hostname=\$HOSTADDRESS\$ --snmp-version=\$_HOSTSNMPVERSION\$ --snmp-community=\$_HOSTSNMPCOMMUNITY\$ \$_HOSTEXTRAOPTIONS\$ \$_SERVICEEXTRAOPTIONS\$ --warning='\$_SERVICEWARNING\$' --critical='\$_SERVICECRITICAL\$'"
3 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Memory;enable_shell;0"
4 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Memory;command_activate;1"
5 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Memory;command_locked;0"
6
7 #Création template service
8 clapi -o STPL -a add -v "Stpl_STORAGE_QNAP_SNMP_Memory;Memory;generic-active-service-custom"
9 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Memory;check_command;Check_STORAGE_QNAP_SNMP_Memory"
10 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Memory;check_period;24x7"
11 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Memory;max_check_attempts;3"
12 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Memory;normal_check_interval;5"
13 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Memory;retry_check_interval;1"
14 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Memory;notification_period;24x7"
15 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Memory;WARNING;'80'"
16 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Memory;CRITICAL;'90'"
17 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Memory;graphtemplate;Memory"
18
19 #Ajout de la template service à la template d hôte
20 clapi -o STPL -a addhost -v "Stpl_STORAGE_QNAP_SNMP_Memory;STORAGE-QNAP-SNMP-SLM"
Hardware-Global
1 #Création commande
2 clapi -o CMD -a ADD -v "Check_STORAGE_QNAP_SNMP_Hardware-Global;2;\$CENTREONPLUGINS\$/centreon_plugins.pl --plugin=storage::qnap::snmp::plugin --mode=hardware --hostname=\$HOSTADDRESS\$ --snmp-version=\$_HOSTSNMPVERSION\$ --snmp-community=\$_HOSTSNMPCOMMUNITY\$ \$_HOSTEXTRAOPTIONS\$ \$_SERVICEEXTRAOPTIONS\$ --warning='\$_SERVICEWARNING\$' --critical='\$_SERVICECRITICAL\$'"
3 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Hardware-Global;enable_shell;0"
4 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Hardware-Global;command_activate;1"
5 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Hardware-Global;command_locked;0"
6
7 #Création template service
8 clapi -o STPL -a add -v "Stpl_STORAGE_QNAP_SNMP_Hardware-Global;Hardware-Global;generic-active-service-custom"
9 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Hardware-Global;check_command;Check_STORAGE_QNAP_SNMP_Hardware-Global"
10 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Hardware-Global;check_period;24x7"
11 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Hardware-Global;max_check_attempts;3"
12 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Hardware-Global;normal_check_interval;5"
13 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Hardware-Global;retry_check_interval;1"
14 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Hardware-Global;notification_period;24x7"
15 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Hardware-Global;WARNING;'80'"
16 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Hardware-Global;CRITICAL;'90'"
17
18 #Ajout de la template service à la template d hôte
19 clapi -o STPL -a addhost -v "Stpl_STORAGE_QNAP_SNMP_Hardware-Global;STORAGE-QNAP-SNMP-SLM"
Disk-Global
1 #Création commande
2 clapi -o CMD -a ADD -v "Check_STORAGE_QNAP_SNMP_Disk-Global;2;\$CENTREONPLUGINS\$/centreon_plugins.pl --plugin=storage::qnap::snmp::plugin --mode=storage --hostname=\$HOSTADDRESS\$ --snmp-version=\$_HOSTSNMPVERSION\$ --snmp-community=\$_HOSTSNMPCOMMUNITY\$ \$_HOSTEXTRAOPTIONS\$ \$_SERVICEEXTRAOPTIONS\$ --storage '\$_SERVICEDISKNAME\$' --name --regexp --display-transform-src='\$_SERVICETRANSFORMSRC\$' --display-transform-dst='\$_SERVICETRANSFORMDST\$' --warning-usage='\$_SERVICEWARNING\$' --critical-usage='\$_SERVICECRITICAL\$'"
3 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Disk-Global;enable_shell;0"
4 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Disk-Global;command_activate;1"
5 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Disk-Global;command_locked;0"
6
7 #Création template service
8 clapi -o STPL -a add -v "Stpl_STORAGE_QNAP_SNMP_Disk-Global;Disk-Global;generic-active-service-custom"
9 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Disk-Global;check_command;Check_STORAGE_QNAP_SNMP_Disk-Global"
10 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Disk-Global;check_period;24x7"
11 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Disk-Global;max_check_attempts;3"
12 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Disk-Global;normal_check_interval;5"
13 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Disk-Global;retry_check_interval;1"
14 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Disk-Global;notification_period;24x7"
15 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Disk-Global;DISKNAME;'.*'"
16 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Disk-Global;WARNING;80"
17 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Disk-Global;CRITICAL;90"
18 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Disk-Global;EXTRAOPTIONS;--verbose --filter-perfdata='storage.space|used|free'"
19 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Disk-Global;graphtemplate;Storage"
20
21 #Ajout de la template service à la template d hôte
22 clapi -o STPL -a addhost -v "Stpl_STORAGE_QNAP_SNMP_Disk-Global;STORAGE-QNAP-SNMP-SLM"
Disk-Generic-Name
1 #Création commande
2 clapi -o CMD -a ADD -v "Check_STORAGE_QNAP_SNMP_Disk-Generic-Name;2;\$CENTREONPLUGINS\$/centreon_plugins.pl --plugin=storage::qnap::snmp::plugin --mode=storage --hostname=\$HOSTADDRESS\$ --snmp-version=\$_HOSTSNMPVERSION\$ --snmp-community=\$_HOSTSNMPCOMMUNITY\$ \$_HOSTEXTRAOPTIONS\$ \$_SERVICEEXTRAOPTIONS\$ --storage '\$_SERVICEDISKNAME\$' --name --display-transform-src='\$_SERVICETRANSFORMSRC\$' --display-transform-dst='\$_SERVICETRANSFORMDST\$' --warning-usage='\$_SERVICEWARNING\$' --critical-usage='\$_SERVICECRITICAL\$'"
3 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Disk-Generic-Name;enable_shell;0"
4 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Disk-Generic-Name;command_activate;1"
5 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Disk-Generic-Name;command_locked;0"
6
7 #Création template service
8 clapi -o STPL -a add -v "Stpl_STORAGE_QNAP_SNMP_Disk-Generic-Name;Disk-Generic-Name;generic-active-service-custom"
9 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Disk-Generic-Name;check_command;Check_STORAGE_QNAP_SNMP_Disk-Generic-Name"
10 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Disk-Generic-Name;check_period;24x7"
11 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Disk-Generic-Name;max_check_attempts;3"
12 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Disk-Generic-Name;normal_check_interval;5"
13 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Disk-Generic-Name;retry_check_interval;1"
14 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Disk-Generic-Name;notification_period;24x7"
15 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Disk-Generic-Name;WARNING;80"
16 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Disk-Generic-Name;CRITICAL;90"
17 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Disk-Generic-Name;EXTRAOPTIONS;--verbose --filter-perfdata='storage.space|used|free'"
18 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Disk-Generic-Name;graphtemplate;Storage"
19
20 #Ajout de la template service à la template d hôte
21 clapi -o STPL -a addhost -v "Stpl_STORAGE_QNAP_SNMP_Disk-Generic-Name;STORAGE-QNAP-SNMP-SLM"
Traffic-Global
1 #Création commande
2 clapi -o CMD -a ADD -v "Check_STORAGE_QNAP_SNMP_Traffic-Global;2;\$CENTREONPLUGINS\$/centreon_plugins.pl --plugin=storage::qnap::snmp::plugin --mode=interfaces --hostname=\$HOSTADDRESS\$ --snmp-version=\$_HOSTSNMPVERSION\$ --snmp-community=\$_HOSTSNMPCOMMUNITY\$ \$_HOSTEXTRAOPTIONS\$ \$_SERVICEEXTRAOPTIONS\$ --interface='\$_SERVICEINTERFACEID\$' --name --add-status --add-traffic --critical-status='\$_SERVICECRITICALSTATUS\$' --warning-in-traffic='\$_SERVICEWARNINGIN\$' --critical-in-traffic='\$_SERVICECRITICALIN\$' --warning-out-traffic='\$_SERVICEWARNINGOUT\$' --critical-out-traffic='\$_SERVICECRITICALOUT\$'"
3 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Traffic-Global;enable_shell;0"
4 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Traffic-Global;command_activate;1"
5 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Traffic-Global;command_locked;0"
6
7 #Création template service
8 clapi -o STPL -a add -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;Traffic-Global;generic-active-service-custom"
9 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;check_command;Check_STORAGE_QNAP_SNMP_Traffic-Global"
10 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;check_period;24x7"
11 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;max_check_attempts;3"
12 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;normal_check_interval;5"
13 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;retry_check_interval;1"
14 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;notification_period;24x7"
15 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;INTERFACEID;'.*'"
16 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;WARNINGIN;'80'"
17 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;CRITICALIN;'90'"
18 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;WARNINGOUT;'80'"
19 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;CRITICALOUT;'90'"
20 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;EXTRAOPTIONS;--verbose"
21 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;graphtemplate;Traffic"
22
23 #Ajout de la template service à la template d hôte
24 clapi -o STPL -a addhost -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Global;STORAGE-QNAP-SNMP-SLM"
Traffic-Generic-Name
1 #Création commande
2 clapi -o CMD -a ADD -v "Check_STORAGE_QNAP_SNMP_Traffic-Generic-Name;2;\$CENTREONPLUGINS\$/centreon_plugins.pl --plugin=os::freebsd::snmp::plugin --mode=interfaces --hostname=\$HOSTADDRESS\$ --snmp-version=\$_HOSTSNMPVERSION\$ --snmp-community=\$_HOSTSNMPCOMMUNITY\$ \$_HOSTEXTRAOPTIONS\$ \$_SERVICEEXTRAOPTIONS\$ --interface='\$_SERVICEINTERFACEID\$' --name --add-status --add-traffic --warning-in-traffic='\$_SERVICEWARNINGIN\$' --critical-in-traffic='\$_SERVICECRITICALIN\$' --warning-out-traffic='\$_SERVICEWARNINGOUT\$' --critical-out-traffic='\$_SERVICECRITICALOUT\$'"
3 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Traffic-Generic-Name;enable_shell;0"
4 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Traffic-Generic-Name;command_activate;1"
5 clapi -o CMD -a setparam -v "Check_STORAGE_QNAP_SNMP_Traffic-Generic-Name;command_locked;0"
6
7 #Création template service
8 clapi -o STPL -a add -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Generic-Name;Traffic-Generic-Name;generic-active-service-custom"
9 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Generic-Name;check_command;Check_STORAGE_QNAP_SNMP_Traffic-Generic-Name"
10 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Generic-Name;check_period;24x7"
11 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Generic-Name;max_check_attempts;3"
12 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Generic-Name;normal_check_interval;5"
13 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Generic-Name;retry_check_interval;1"
14 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Generic-Name;notification_period;24x7"
15 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Generic-Name;INTERFACEID;'^.*$'"
16 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Generic-Name;WARNINGIN;'80'"
17 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Generic-Name;CRITICALIN;'90'"
18 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Generic-Name;WARNINGOUT;'80'"
19 clapi -o STPL -a setmacro -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Generic-Name;CRITICALOUT;'90'"
20 clapi -o STPL -a setparam -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Generic-Name;graphtemplate;Traffic"
21
22 #Ajout de la template service à la template d hôte
23 clapi -o STPL -a addhost -v "Stpl_STORAGE_QNAP_SNMP_Traffic-Generic-Name;STORAGE-QNAP-SNMP-SLM"