Plugin OS-linux-ssh

De SLM - MediaWiki
Révision datée du 1 avril 2020 à 08:37 par Admin (discussion | contributions) (Page créée avec « Retour ==Plugin== /usr/lib/centreon/plugins/centreon_plugins.pl --plugin=os::linux::local::plugin ==HOST== *Creation de la template d'hote clapi... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)

Retour

Plugin

/usr/lib/centreon/plugins/centreon_plugins.pl --plugin=os::linux::local::plugin

HOST

  • Creation de la template d'hote
clapi -o HTPL -a add -v "OS-Linux-local;OS-Linux-local;;;;"
clapi -o HTPL -a addtemplate -v "OS-Linux-local;generic-active-host-custom"

cpu

  • Creation commande
clapi -o CMD -a ADD -v "check_os_linux_local_cpu;2;\$CENTREONPLUGINS\$/centreon_linux_local.pl --plugin=os::linux::local::plugin --mode=cpu --warning-average ='\$_SERVICEWARNING\$' --critical-average ='\$_SERVICECRITICAL\$' "
clapi -o CMD -a setparam -v "check_os_linux_local_cpu;enable_shell;0"
clapi -o CMD -a setparam -v "check_os_linux_local_cpu;command_activate;1"
clapi -o CMD -a setparam -v "check_os_linux_local_cpu;command_locked;0"
  • Creation template service
clapi -o STPL -a add -v "stpl_os_linux_local_cpu;cpu;generic-active-service-custom"
clapi -o STPL -a setparam -v "stpl_os_linux_local_cpu;check_command;check_os_linux_local_cpu"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_cpu;WARNING;70"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_cpu;CRITICAL;90"
clapi -o STPL -a setparam -v "stpl_os_linux_local_cpu;graphtemplate;CPU"
  • Ajout de la template service à la template d'hote
clapi  -o STPL -a addhost -v "stpl_os_linux_local_cpu;OS-Linux-local"

load

  • Creation commande

commande check_os_linux_local_load

clapi -o CMD -a ADD -v "check_os_linux_local_load;2;\$CENTREONPLUGINS\$/centreon_linux_local.pl --plugin=os::linux::local::plugin --mode=load --warning='\$_SERVICEWARNING\$'  --critical='\$_SERVICECRITICAL\$' "
clapi -o CMD -a setparam -v "check_os_linux_local_load;enable_shell;0"
clapi -o CMD -a setparam -v "check_os_linux_local_load;command_activate;1"
clapi -o CMD -a setparam -v "check_os_linux_local_load;command_locked;0"
  • Creation template service
clapi -o STPL -a add -v "stpl_os_linux_local_load;load;generic-active-service-custom"
clapi -o STPL -a setparam -v "stpl_os_linux_local_load;check_command;check_os_linux_local_load"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_load;WARNING;4,3,2"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_load;CRITICAL;6,5,4"
clapi -o STPL -a setparam -v "stpl_os_linux_local_load;graphtemplate;LOAD_Average"
  • Ajout de la template service à la template d'hote
clapi  -o STPL -a addhost -v "stpl_os_linux_local_load;OS-Linux-local"

memory

  • Creation commande

commande check_os_linux_local_memory

clapi -o CMD -a ADD -v "check_os_linux_local_memory;2;\$CENTREONPLUGINS\$/centreon_linux_local.pl --plugin=os::linux::local::plugin --mode=memory --warning='\$_SERVICEWARNING\$'  --critical='\$_SERVICECRITICAL\$' "
clapi -o CMD -a setparam -v "check_os_linux_local_memory;enable_shell;0"
clapi -o CMD -a setparam -v "check_os_linux_local_memory;command_activate;1"
clapi -o CMD -a setparam -v "check_os_linux_local_memory;command_locked;0"
  • Creation template service
clapi -o STPL -a add -v "stpl_os_linux_local_memory;memory;generic-active-service-custom"
clapi -o STPL -a setparam -v "stpl_os_linux_local_memory;check_command;check_os_linux_local_memory"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_memory;WARNING;70"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_memory;CRITICAL;90"
clapi -o STPL -a setparam -v "stpl_os_linux_local_memory;graphtemplate;Memory"
  • Ajout de la template service à la template d'hote
clapi  -o STPL -a addhost -v "stpl_os_linux_local_memory;OS-Linux-local"

swap

  • Creation commande

commande check_os_linux_local_swap

clapi -o CMD -a ADD -v "check_os_linux_local_swap;2;\$CENTREONPLUGINS\$/centreon_linux_local.pl --plugin=os::linux::local::plugin --mode=swap --warning-usage-prct='\$_SERVICEWARNING\$'  --critical-usage-prct='\$_SERVICECRITICAL\$' "
clapi -o CMD -a setparam -v "check_os_linux_local_swap;enable_shell;0"
clapi -o CMD -a setparam -v "check_os_linux_local_swap;command_activate;1"
clapi -o CMD -a setparam -v "check_os_linux_local_swap;command_locked;0"
  • Creation template service
clapi -o STPL -a add -v "stpl_os_linux_local_swap;swap;generic-active-service-custom"
clapi -o STPL -a setparam -v "stpl_os_linux_local_swap;check_command;check_os_linux_local_swap"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_swap;WARNING;80"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_swap;CRITICAL;90"
clapi -o STPL -a setparam -v "stpl_os_linux_local_swap;graphtemplate;Memory"
  • Ajout de la template service à la template d'hote
clapi  -o STPL -a addhost -v "stpl_os_linux_local_swap;OS-Linux-local"

traffic

  • Creation commande

commande check_os_linux_local_traffic

clapi -o CMD -a ADD -v "check_os_linux_local_traffic;2;\$CENTREONPLUGINS\$/centreon_linux_local.pl --plugin=os::linux::local::plugin --mode=traffic --speed='\$_SERVICESPEED\$' --name='\$_SERVICEINTERFACE\$' --warning-out='\$_SERVICEWARNING\$' --critical-out='\$_SERVICECRITICAL\$' --warning-in='\$_SERVICEWARNING\$' --critical-in='\$_SERVICECRITICAL\$' '\$_SERVICEOPTION\$' "
clapi -o CMD -a setparam -v "check_os_linux_local_traffic;enable_shell;0"
clapi -o CMD -a setparam -v "check_os_linux_local_traffic;command_activate;1"
clapi -o CMD -a setparam -v "check_os_linux_local_traffic;command_locked;0"
  • Creation template service
clapi -o STPL -a add -v "stpl_os_linux_local_traffic;swap;generic-active-service-custom"
clapi -o STPL -a setparam -v "stpl_os_linux_local_traffic;check_command;check_os_linux_local_traffic"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_traffic;INTERFACE;eth0"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_traffic;SPEED;1000"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_traffic;OPTION;--units=%"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_traffic;WARNING;80"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_traffic;CRITICAL;90"
clapi -o STPL -a setparam -v "stpl_os_linux_local_traffic;graphtemplate;Traffic"
  • Ajout de la template service à la template d'hote
clapi  -o STPL -a addhost -v "stpl_os_linux_local_traffic;OS-Linux-local"

storage

  • Creation commande

commande check_os_linux_local_storage

clapi -o CMD -a ADD -v "check_os_linux_local_storage;2;\$CENTREONPLUGINS\$/centreon_linux_local.pl --plugin=os::linux::local::plugin --mode=storage --name='\$_SERVICEDISK\$'  --regexp --warning-usage='\$_SERVICEWARNING\$'  --critical-usage='\$_SERVICECRITICAL\$' "
clapi -o CMD -a setparam -v "check_os_linux_local_storage;enable_shell;0"
clapi -o CMD -a setparam -v "check_os_linux_local_storage;command_activate;1"
clapi -o CMD -a setparam -v "check_os_linux_local_storage;command_locked;0"
  • Creation template service
# Model Disk global
clapi -o STPL -a add -v "stpl_os_linux_local_storage;disk-global;generic-active-service-custom"
clapi -o STPL -a setparam -v "stpl_os_linux_local_storage;check_command;check_os_linux_local_storage"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_storage;WARNING;80"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_storage;CRITICAL;90"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_storage;DISK;.*"
clapi -o STPL -a setparam -v "stpl_os_linux_local_storage;graphtemplate;Storage"

Disk home

  • Creation template service
clapi -o STPL -a add -v "stpl_os_linux_local_storage_home;disk-home;stpl_os_linux_local_storage"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_storage_home;DISK;^/home\$"
  • Ajout de la template service à la template d'hote
clapi  -o STPL -a addhost -v "stpl_os_linux_local_storage_home;OS-Linux-local"

Disk root

  • Creation template service
clapi -o STPL -a add -v "stpl_os_linux_local_storage_root;disk-root;stpl_os_linux_local_storage"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_storage_root;DISK;^/\$"
  • Ajout de la template service à la template d'hote
clapi  -o STPL -a addhost -v "stpl_os_linux_local_storage_root;OS-Linux-local"

Disk tmp

  • Creation template service
clapi -o STPL -a add -v "stpl_os_linux_local_storage_tmp;disk-tmp;stpl_os_linux_local_storage"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_storage_tmp;DISK;^/tmp\$"
  • Ajout de la template service à la template d'hote
clapi  -o STPL -a addhost -v "stpl_os_linux_local_storage_tmp;OS-Linux-local"

Disk usr

  • Creation template service
clapi -o STPL -a add -v "stpl_os_linux_local_storage_usr;disk-usr;stpl_os_linux_local_storage"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_storage_usr;DISK;^/usr\$"
  • Ajout de la template service à la template d'hote
clapi  -o STPL -a addhost -v "stpl_os_linux_local_storage_usr;OS-Linux-local"

Disk var

  • Creation template service
clapi -o STPL -a add -v "stpl_os_linux_local_storage_var;disk-var;stpl_os_linux_local_storage"
clapi -o STPL -a setmacro -v "stpl_os_linux_local_storage_var;DISK;^/var\$"
  • Ajout de la template service à la template d'hote
clapi  -o STPL -a addhost -v "stpl_os_linux_local_storage_var;OS-Linux-local"