Skip to content
Prometheus exporter for Kodi
Go Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
kodi
vendor/github.com
version
.gitignore
ChangeLog.md
LICENSE
Makefile
README.md
glide.yaml
kodi_exporter.go
kodi_exporter_test.go
prometheus.yml

README.md

kodi_exporter

License Apache 2 GitHub version

Master :

  • Circle CI

Develop :

  • Circle CI

Installation

You can download the binaries :

Usage

First, test your Kodi API using bash:

$ curl -X POST -H "Content-Type: application/json" \
        -d '{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"add you title here","message":"add your message here"},"id":1}'  http://192.168.1.10:8080/jsonrpc
{"id":1,"jsonrpc":"2.0","result":"OK"}

Then Launch the Prometheus exporter :

$ kodi_exporter -log.level=debug -kodi.server 192.168.1.10 -kodi.port 8080

Debug

You could try your Kodi API :

  • Artists:

      $ curl': curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"AudioLibrary.GetArtists","params":{},"id":1}'  http://10.10.10.10:8080/jsonrpc
    
  • Albums:

      $ curl': curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"AudioLibrary.GetAlbums","params":{},"id":1}'  http://10.10.10.10:8080/jsonrpc
    
  • Songs:

      $ curl': curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"AudioLibrary.GetSongs","params":{},"id":1}'  http://10.10.10.10:8080/jsonrpc
    

Development

  • Initialize environment

      $ make init
    
  • Build tool :

      $ make build
    
  • Launch unit tests :

      $ make test
    

Local Deployment

  • Launch Prometheus using the configuration file in this repository:

      $ prometheus -config.file=prometheus.yml
    
  • Launch exporter:

      $ kodi_exporter -log.level=debug -kodi.server 192.168.1.10 -kodi.port 8080
    
  • Check that Prometheus find the exporter on http://localhost:9090/targets

Contributing

See CONTRIBUTING.

License

See LICENSE for the complete license.

Changelog

A changelog is available

Contact

Nicolas Lamirault nicolas.lamirault@gmail.com

You can’t perform that action at this time.