parent
3e894ebcc5
commit
15fea52ca5
@ -1,12 +0,0 @@
|
||||
command:
|
||||
|
||||
influx -execute 'show databases':
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "/^name: databases$/"
|
||||
- "/^_internal$/"
|
||||
- "/^ngcp$/"
|
||||
- "/^telegraf$/"
|
||||
stderr: []
|
||||
timeout: 10000
|
||||
|
@ -0,0 +1,35 @@
|
||||
[%
|
||||
hostname = ngcp.get_hostname();
|
||||
|
||||
argv.host = hostname;
|
||||
argv.type = 'ha_int';
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host';
|
||||
ha_ips = out;
|
||||
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
||||
ha_ips = out.merge(ha_ips);
|
||||
-%]
|
||||
command:
|
||||
|
||||
[% IF monitoring.backend == 'influxdb' -%]
|
||||
influx -execute 'show databases':
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "/^name: databases$/"
|
||||
- "/^_internal$/"
|
||||
- "/^ngcp$/"
|
||||
- "/^telegraf$/"
|
||||
stderr: []
|
||||
timeout: 10000
|
||||
[% ELSE -%]
|
||||
promtool query instant http://[% ha_ips.0 || 'localhost' %]:[% prometheus.port || 9090 %] '{__name__=~".+"}':
|
||||
exit-status: 0
|
||||
stdout:
|
||||
- "/^go_/"
|
||||
- "/^namedprocess_/"
|
||||
- "/^ngcp_/"
|
||||
- "/^node_/"
|
||||
- "/^process_/"
|
||||
- "/^redis_/"
|
||||
stderr: []
|
||||
timeout: 10000
|
||||
[% END -%]
|
Loading…
Reference in new issue