Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

YAML ouptput publishing #39

Open
skonefal opened this issue Jan 3, 2017 · 0 comments
Open

YAML ouptput publishing #39

skonefal opened this issue Jan 3, 2017 · 0 comments

Comments

@skonefal
Copy link

skonefal commented Jan 3, 2017

Current "json-like" publisher does not really publish real json file. Multiple iterations appends json structure to file, instead of creating json array.

Because proper appending to json array is not straightforward, I would like to propose adding YAML output to publisher.

Yaml publishing could be added in configuration, so that backward compatibility would not be broken.

A yaml output would generate Yaml list in following way:

  • If output file is empty, creates a yaml header and prints output metrics as lists, that begins with list
  • If output file is not empty, it should append metrics as list as list

Example output:

---
- Metric
   - Data: 5
   - Namespace: /intel/metric/1
- Metric
   - Data: 5
   - Namespace: /intel/metric/1

This way, whole file could be easily consumed and unmarshaled as a whole.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants