Skip to content

Instantly share code, notes, and snippets.

@kaveenr
Last active May 13, 2020 09:57
Show Gist options
  • Save kaveenr/7df6249fa0a9ea51a3be934c4871ca38 to your computer and use it in GitHub Desktop.
Save kaveenr/7df6249fa0a9ea51a3be934c4871ca38 to your computer and use it in GitHub Desktop.
- 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']
<?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