prom-query
v1.0.0
Published
Prometheus Query API Wrapper
Downloads
10
Readme
prom-query
Prometheus Query API Wrapper
Usage
Constructor
const prom = new PromQuery({ url: 'http://PROMETHEUS:PORT' });
getMetricNames(job, cb)
Return an array of metric names for a given job.
getMetrics(options, cb)
Return an array of metrics given the following options:
names
: array of metric namesinstances
: array of instance namesstart
: string representation of start date range to get metrics forend
: string representation of end date range to get metrics for
Resulting metrics have the following format:
[
{
name: String,
instance: String,
metrics: [
time: Date,
value: Number
]
}
]