Last active
May 13, 2020 09:57
-
-
Save kaveenr/7df6249fa0a9ea51a3be934c4871ca38 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- job_name: node_exporter_metrics | |
scrape_interval: 5s | |
static_configs: | |
- targets: ['172.16.155.60:9100'] | |
- job_name: node_exporter_metrics | |
scrape_interval: 5s | |
static_configs: | |
- targets: ['172.16.155.60:9100'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$inData = array ("foo","bar"); | |
$outData = array(); | |
foreach ($inData as &$value) { | |
$entry = array ( | |
'job_name' => 'node_exporter_metrics', | |
'scrape_interval' => '5s', | |
'static_configs' => | |
array ( | |
'targets' => | |
array ( | |
0 => $value, | |
), | |
), | |
); | |
array_push($outData, $entry); | |
} | |
echo Yaml::dump($outData); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment