ojob ojob.io/formats/toOpenMetrics input=some/path output=some/path prefix=test joburl=http://gw:9091/metrics/job/myjob timestamp=true timefield=__ts timeadjust=1468800 filter=_id,date path=values convertValues=true
Converts input __pm map (or stdin) into a OpenMetrics format and optionally send it to a gateway.
Name | Description |
---|---|
input | The path where to find the openmetrics files |
output | The output path |
prefix | The metrics prefix to use |
joburl | The prometheus gateway equivalent job url (e.g. http://gw:9091/metrics/job/myjob) |
timestamp | If "timestamp=true" it will include the timestamp of when the data was produced. If timefield is not defined it uses the current time. |
timefield | The JSON path to the field from where to derive the timestamp if timestamp=true (the field will be removed from the metrics data) |
timeadjust | Number of seconds, positive or negative, to adjust the timefield value if needed. |
filter | Comma-delimited list of labels to ignore in the resulting openmetrics output |
path | A JSON path to assume for each entry |
convertValues | If "true" it will convert the values with units (e.g. 10ms) to numbers |