kodi_exporter

command module
Version: v0.0.0-...-656448c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL