Try 005
This commit is contained in:
parent
38883c4fca
commit
d815f156e3
|
@ -52,6 +52,7 @@
|
|||
<variable name='prCliSonde' type='string' description="Sonde a utiliser pour ce client">
|
||||
<value>Node Exporter</value>
|
||||
</variable>
|
||||
<variable name='prCliPort' type='number' description="Port d'écoute de la sonde du client"/>
|
||||
</family>
|
||||
<family name="grafana">
|
||||
<variable name='grafana_domain' type='string' description="Nom de Domaine ou IP pour accèder à l'interface Grafana" mandatory='True'>
|
||||
|
@ -78,7 +79,7 @@
|
|||
</group>
|
||||
|
||||
<check name='valid_enum' target='prCliSonde'>
|
||||
<param>['Node Exporter']</param>
|
||||
<param>['Node Exporter','Port']</param>
|
||||
</check>
|
||||
|
||||
<condition name='disabled_if_in' source='activer_prometheus'>
|
||||
|
@ -97,6 +98,11 @@
|
|||
<target type='variable'>prCli</target>
|
||||
<target type='variable'>prCliIP</target>
|
||||
<target type='variable'>prCliSonde</target>
|
||||
<target type='variable'>prCliPort</target>
|
||||
</condition>
|
||||
<condition name='disabled_if_not_in' source='prCliSonde'>
|
||||
<param>Port</param>
|
||||
<target type='variable'>prCliPort</target>
|
||||
</condition>
|
||||
</constraints>
|
||||
<help>
|
||||
|
|
|
@ -26,6 +26,9 @@ scrape_configs:
|
|||
%if %%cliPr.prCliSonde == 'Node Exporter'
|
||||
- targets: ['%%cliPr.prCliIP:9100']
|
||||
%end if
|
||||
%if %%cliPr.prCliSonde == 'Port'
|
||||
- targets: ['%%cliPr.prCliIP:%%cliPr.prCliPort']
|
||||
%end if
|
||||
%end for
|
||||
%end if
|
||||
|
||||
|
|
Loading…
Reference in New Issue