bonjour,
je rencontre des problème pour déployer des discovery rules pour obtenir l'état des services d'un serveur Linux.
voici ce que j'ai mis en place :
dans le fichier de conf zabbix_agend.conf -> UserParameter=servicestatusdiscovery,echo "{ "data":[" ; service --status-all | /usr/bin/awk '{ print " { "{#Activite}":"" $2 "", "{$Service}":"" $4 "" },"}' | /usr/bin/sort | /usr/bin/uniq | /bin/sed -e 's/\//\\\//g' -e '$s/.$//' ; echo $
la discovery rules :
et ma règle de decouverte :
Cannot create item: item with the same key "servicestatus[$Service]" already exists.
Cannot create item: item with the same key "servicestatus[$Service]" already exists.
Cannot create item: item with the same key "servicestatus[$Service]" already exists.
Cannot create item: item with the same key "servicestatus[$Service]" already exists.
Cannot create item: item with the same key "servicestatus[$Service]" already exists.
je n'arrive pas a faire remplacer la variable $Service qui devrait prendre le nom du service pour créer l'item.
merci pour votre aide.
je rencontre des problème pour déployer des discovery rules pour obtenir l'état des services d'un serveur Linux.
voici ce que j'ai mis en place :
dans le fichier de conf zabbix_agend.conf -> UserParameter=servicestatusdiscovery,echo "{ "data":[" ; service --status-all | /usr/bin/awk '{ print " { "{#Activite}":"" $2 "", "{$Service}":"" $4 "" },"}' | /usr/bin/sort | /usr/bin/uniq | /bin/sed -e 's/\//\\\//g' -e '$s/.$//' ; echo $
la discovery rules :
- Name
- Type
Zabbix agentZabbix agent (active)Simple checkSNMPv1 agentSNMPv2 agentSNMPv3 agentZabbix internalZabbix trapperExternal checkDatabase monitorIPMI agentSSH agentTELNET agentJMX agent - Key
- Host interface :XX.XX.XX.XX:10050
- Update interval
et ma règle de decouverte :
- Name
- Type
Zabbix agentZabbix agent (active)Simple checkSNMPv1 agentSNMPv2 agentSNMPv3 agentSNMP trapZabbix internalZabbix trapperZabbix aggregateExternal checkDatabase monitorIPMI agentSSH agentTELNET agentJMX agentCalculatedDependent item - Key
Select - Host interface XX.XX.XX.XX:10050
- Type of information
Numeric (unsigned)Numeric (float)CharacterLogText - Update interval
Cannot create item: item with the same key "servicestatus[$Service]" already exists.
Cannot create item: item with the same key "servicestatus[$Service]" already exists.
Cannot create item: item with the same key "servicestatus[$Service]" already exists.
Cannot create item: item with the same key "servicestatus[$Service]" already exists.
Cannot create item: item with the same key "servicestatus[$Service]" already exists.
je n'arrive pas a faire remplacer la variable $Service qui devrait prendre le nom du service pour créer l'item.
merci pour votre aide.