This repository has been archived by the owner on Mar 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
REST reporter
Loïc Huertas edited this page Nov 4, 2015
·
4 revisions
You can use this reporter by using the given actor: RestReporter
.
val cpu_simple = new PowerMeter(actorRefFactory, Seq(ProcFSCpuSimpleModule())) // module creation
val restReporter = actorRefFactory.actorOf(Props(classOf[RestReporter], cpu_simple, actorRefFactory)) // actor creation
- Host IP address used for HTTP server and for identifying a PowerAPI instance on distributed context.
- Default value :
localhost
powerapi.rest.host-address = "192.168.1.25"
- Database IP address.
- Default value :
localhost
powerapi.rest.database-address = "192.168.1.40"
In these exemples, the host and database address is 127.0.0.1
To see all monitored processes :
curl http://127.0.0.1/energy
To start monitoring of the 123 process:
curl -X POST http://127.0.0.1/energy/123/start
To stop monitoring of the 123 process:
curl -X POST http://127.0.0.1/energy/123/stop