Skip to content

preved911/prometheus-json-exporter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prometheus-json-exporter Build Status

A prometheus exporter which fetches arbitrary JSON from remote API and exports the values as gauge metrics.

Installation

$ go get github.com/preved911/prometheus-json-exporter

Example Usage

$ curl -s "http://validate.jsontest.com/?json=%7B%22key%22:%22value%22%7D"
{
   "object_or_array": "object",
   "empty": false,
   "parse_time_nanoseconds": 24618,
   "validate": true,
   "size": 1
}

$ curl -s "http://localhost:9116/probe?target=http://validate.jsontest.com/?json=%7B%22key%22:%22value%22%7D"
# HELP empty Retrieved value
# TYPE empty gauge
empty 0
# HELP parse_time_nanoseconds Retrieved value
# TYPE parse_time_nanoseconds gauge
parse_time_nanoseconds 41626
# HELP size Retrieved value
# TYPE size gauge
size 1
# HELP validate Retrieved value
# TYPE validate gauge
validate 1

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 93.2%
  • Dockerfile 6.8%