Metering
The purpose of the metering microservice is to:
- Provide distributed AMPs an endpoint to record entity and location usage
- Provide a management endpoint that can be queried to retrieve the usage information
The following sections provide details about it, how to deploy it and configure AMP to use it.
Running the metering microservice
You can deploy it using this blueprint or you can run it as a standalone service:
java -jar target/metering-microservice-1.0-SNAPSHOT.jar
--spring.datasource.username=[username]
--spring.datasource.password=[password]
--spring.datasource.url=jdbc:mysql://localhost:3306/mydb
--security.user.password=[password]
Setting up AMP to use the metering microservice
brooklyn.usageManager.listeners=io.cloudsoft.metering.MeteringPusher
amp.metering.listener.ampId=my_amp_id_1
amp.metering.listener.push.endpoint=http://192.168.0.1:8080
amp.metering.listener.push.username=example_username
amp.metering.listener.push.password=example_password