Refonte complète de cet article pour profiter des plugins-pack de la plateforme Centreon Open-Source. Nous utiliserons une architecture Centreon standard pour configurer le plugin. L'API Centreon-Clapi sera requis pour notre configuration. En effet, il vous suffira de copier-coller mes commandes pour réaliser la configuration. Cette méthode est vraiment plus efficace que l'utilisation de l'interface graphique.
1 Le module centreon_linux_local.pl
Notre exemple sera basé sur la supervision du serveur Centreon. Nous utiliserons les modes load, cpu, memory, swap, traffic et storage. Notre configuration sera réalisé avec des templates créés avec l'API Clapi car il n'existe pas de plugin-pack pour ce plugin.
Pour avoir les mêmes fonctionnalités que le plugin FatPacked
centreon_linux_local.pl => centreon_plugins.pl --plugin=os::linux::local::plugin
1.1 Schéma global de la configuration
Voici la configuration de notre serveur de supervision. Les bonnes pratiques de Centreon préconisent des commandes unitaires. Nous utiliserons les templates de services et d'hôtes. La première configuration est assez fastidieuse à réaliser mais permet un gain de temps lors de la création des hôtes. Nous avons deux schémas, le premier pour une distribution Open-Source sans plugin-pack et le deuxième pour une distribution Open-Source avec plugin-pack.
1.1a Open-Source sans plugin-pack
1.1b Open-Source avec plugin-pack
1.2 Préparation des commandes Clapi
Avant de créer notre configuration, vous pouvez améliorer l'utilisation de la commande clapi si ce n'est pas déjà fait.
1.3 Installation du plugin centreon_linux_local.pl
Installez le plugin centreon_linux_local
yum install centreon-plugin-Operatingsystems-Linux-Local -y
Pour les utilisateur de Debian, utilisez la procédure sur la page Les nouveaux plugins Centreon chapitre 2.1
2 Création de la configuration avec clapi
2.1 les commandes de base
Si vous n'avez pas la configuration des plugins-pack ou que vous êtes sur une distribution Debian (ou autre) sans configuration, voici la configuration de base nécessaire à la suite du tutoriel.
Centreon-Clapi
commande check_os_linux_local_cpu
commande check_ping
Template de base pour les service
Template pour le service Pin-Lan-service
Template pour le generic-host
commande check_os_linux_local_cpu
clapi -o CMD -a ADD -v 'check_host_alive;2;$USER1$/check_icmp -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1'
clapi -o CMD -a setparam -v "check_host_alive;enable_shell;0"
clapi -o CMD -a setparam -v "check_host_alive;command_activate;1"
clapi -o CMD -a setparam -v "check_host_alive;command_locked;0"
commande check_ping
clapi -o CMD -a ADD -v 'check_ping;check;$USER1$/check_icmp -H $HOSTADDRESS$ -n $_SERVICEPACKETNUMBER$ -w $_SERVICEWARNING$ -c $_SERVICECRITICAL$'
clapi -o CMD -a setparam -v "check_ping;enable_shell;0"
clapi -o CMD -a setparam -v "check_ping;command_activate;1"
clapi -o CMD -a setparam -v "check_ping;command_locked;0"
Template de base pour les service
clapi -o STPL -a ADD -v "service-generique-actif;service-generique-actif;"
clapi -o STPL -a setparam -v "service-generique-actif;check_period;24x7"
clapi -o STPL -a setparam -v "service-generique-actif;max_check_attempts;3"
clapi -o STPL -a setparam -v "service-generique-actif;normal_check_interval;5"
clapi -o STPL -a setparam -v "service-generique-actif;retry_check_interval;2"
clapi -o STPL -a setparam -v "service-generique-actif;active_checks_enabled;1"
clapi -o STPL -a setparam -v "service-generique-actif;passive_checks_enabled;0"
clapi -o STPL -a setparam -v "service-generique-actif;notifications_enabled;1"
clapi -o STPL -a addcontactgroup -v "service-generique-actif;Supervisors"
clapi -o STPL -a setparam -v "service-generique-actif;notification_interval;0"
clapi -o STPL -a setparam -v "service-generique-actif;notification_period;24x7"
clapi -o STPL -a setparam -v "service-generique-actif;notification_options;w,c,r,f,s"
clapi -o STPL -a setparam -v "service-generique-actif;first_notification_delay;0"
Template pour le service Pin-Lan-service
clapi -o STPL -a ADD -v "Ping-Lan-service;Ping-Lan;service-generique-actif"
clapi -o STPL -a setparam -v "Ping-Lan-service;check_command;check_ping"
clapi -o STPL -a setmacro -v "Ping-Lan-service;PACKETNUMBER;5"
clapi -o STPL -a setmacro -v "Ping-Lan-service;WARNING;220,20%"
clapi -o STPL -a setmacro -v "Ping-Lan-service;CRITICAL;400,50%"
clapi -o STPL -a setparam -v "Ping-Lan-service;graphtemplate;Latency"
Template pour le generic-host
clapi -o HTPL -a ADD -v "generic-host;generic-host;;;;"
clapi -o HTPL -a setparam -v "generic-host;check_command;check_host_alive"
clapi -o HTPL -a setparam -v "generic-host;check_period;24x7"
clapi -o HTPL -a setparam -v "generic-host;notification_period;24x7"
clapi -o HTPL -a setparam -v "generic-host;host_max_check_attempts;5"
clapi -o HTPL -a setparam -v "generic-host;host_active_checks_enabled;1"
clapi -o HTPL -a setparam -v "generic-host;host_passive_checks_enabled;0"
clapi -o HTPL -a setparam -v "generic-host;host_checks_enabled;2"
clapi -o HTPL -a setparam -v "generic-host;host_obsess_over_host;2"
clapi -o HTPL -a setparam -v "generic-host;host_check_freshness;2"
clapi -o HTPL -a setparam -v "generic-host;host_event_handler_enabled;2"
clapi -o HTPL -a setparam -v "generic-host;host_flap_detection_enabled;2"
clapi -o HTPL -a setparam -v "generic-host;host_process_perf_data;2"
clapi -o HTPL -a setparam -v "generic-host;host_retain_status_information;2"
clapi -o HTPL -a setparam -v "generic-host;host_retain_nonstatus_information;2"
clapi -o HTPL -a setparam -v "generic-host;host_notification_interval;0"
clapi -o HTPL -a setparam -v "generic-host;host_notification_options;d,r"
clapi -o HTPL -a setparam -v "generic-host;host_notifications_enabled;0"
clapi -o HTPL -a setparam -v "generic-host;contact_additive_inheritance;0"
clapi -o HTPL -a setparam -v "generic-host;cg_additive_inheritance;0"
clapi -o HTPL -a setparam -v "generic-host;host_snmp_community;public"
clapi -o HTPL -a setparam -v "generic-host;host_snmp_version;2c"
clapi -o STPL -a addhost -v "Ping-Lan-service;generic-host"
2.2 les commandes unitaires
Les commandes unitaires vont être créés avec les commandes clapi. Les commandes contiendront des macros de service.
Centreon-Clapi
commande check_os_linux_local_cpu
commande check_os_linux_local_load
commande check_os_linux_local_memory
commande check_os_linux_local_swap
commande check_os_linux_local_traffic
commande check_os_linux_local_cpu
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='\$_SERVICEWARNING\$' --critical='\$_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"
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"
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"
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"
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"
Voici un exemple pour la commande check_os_linux_local_traffic
2.3 La commande check_os_linux_local_storage
Cette commande, contrairement aux précédentes, sera utilisée par plusieurs modèles de services. Voici les relations entre la commande et les modèle de services. Le premier service supervisera tous les disques tandis que les modèles dépendant du premier modèle stpl_os_linux_local_storage superviserons qu'un seul disque.
Centreon-Clapi
commande check_os_linux_local_storage
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"
Voici la configuration la commande dans l'interface web.
2.4 Les modèles (template) de service
Maintenant, il s'agit de créer les modèles de services pour les modes (commandes) que l'on a défini en début de chapitre.
Les templates de service pour les systèmes de fichiers Linux utiliseront un modèle principal stpl_os_linux_local_storage. Voici les commandes clapi pour créer ces modèles de service.
2.4a Création des modèles sans plugin-pack
Centreon-clapi
# CPU
# LOAD
# MEMORY
# SWAP
# NETWORK
# DISK
# Model Disk global
# DISK
# Disk home
# DISK
# Disk root
# DISK
# Disk tmp
# DISK
# Disk usr
# DISK
# Disk var
# CPU
clapi -o STPL -a add -v "stpl_os_linux_local_cpu;cpu;service-generique-actif"
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"
# LOAD
clapi -o STPL -a add -v "stpl_os_linux_local_load;load;service-generique-actif"
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"
# MEMORY
clapi -o STPL -a add -v "stpl_os_linux_local_memory;memory;service-generique-actif"
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"
# SWAP
clapi -o STPL -a add -v "stpl_os_linux_local_swap;swap;service-generique-actif"
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"
# NETWORK
clapi -o STPL -a add -v "stpl_os_linux_local_traffic;swap;service-generique-actif"
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"
# DISK
# Model Disk global
clapi -o STPL -a add -v "stpl_os_linux_local_storage;disk-global;service-generique-actif"
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
# Disk home
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\$"
# DISK
# Disk root
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;^/\$"
# DISK
# Disk tmp
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\$"
# DISK
# Disk usr
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\$"
# DISK
# Disk var
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\$"
2.4a Création des modèles avec plugin-pack
Centreon-clapi
# CPU
# LOAD
# MEMORY
# SWAP
# NETWORK
# DISK
# Model Disk global
# DISK
# Disk home
# DISK
# Disk root
# DISK
# Disk tmp
# DISK
# Disk usr
# DISK
# Disk var
# CPU
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"
# LOAD
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"
# MEMORY
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"
# SWAP
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"
# NETWORK
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"
# DISK
# 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
# Disk home
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\$"
# DISK
# Disk root
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;^/\$"
# DISK
# Disk tmp
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\$"
# DISK
# Disk usr
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\$"
# DISK
# Disk var
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\$"
Vous obtiendrez, par exemple, le template stpl_os_linux_local_traffic.
2.5 Le template d’hôte
Nous regrouperons les services dans un template d'hôte nommé Os-Linux-local
2.5a Création des modèles sans plugin-pack
Centreon-clapi
# HOSTS MODEL GROUP
# HOSTS MODEL GROUP
clapi -o HTPL -a add -v "OS-Linux-local;OS-Linux-local;;;;"
clapi -o HTPL -a addtemplate -v "OS-Linux-local;generic-host"
clapi -o STPL -a addhost -v "stpl_os_linux_local_cpu;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_load;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_memory;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_swap;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_traffic;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_storage_home;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_storage_root;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_storage_tmp;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_storage_usr;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_storage_var;OS-Linux-local"
2.5a Création des modèles sans plugin-pack
Centreon-clapi
# HOSTS MODEL GROUP
# HOSTS MODEL GROUP
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"
clapi -o STPL -a addhost -v "stpl_os_linux_local_cpu;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_load;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_memory;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_swap;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_traffic;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_storage_home;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_storage_root;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_storage_tmp;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_storage_usr;OS-Linux-local"
clapi -o STPL -a addhost -v "stpl_os_linux_local_storage_var;OS-Linux-local"
Voici le modèle d'hôte dans l'IHM.
2.6 Création de notre hôte
Pour créer notre hôte nous utiliserons le template d'hôte OS-Linux-local et par conséquent le template generic-host ou generic-active-host-custom
Centreon-clapi
# CREATE HOST
# CREATE HOST
clapi -o HOST -a add -v "supervision;serveur supervision;127.0.0.1;generic-host;Central;"
clapi -o HOST -a addtemplate -v "supervision;OS-Linux-local"
clapi -o HOST -a applytpl -v "supervision"
3 Vérification de la configuration
Appliquez la configuration. Vous devriez avoir cette vue pour les services après quelques minutes de fonctionnement.