diff options
author | 2019-10-31 15:46:37 -0700 | |
---|---|---|
committer | 2019-11-11 14:39:44 -0800 | |
commit | d11cb99fb101a6798fd57fa44d332737d6637e75 (patch) | |
tree | 0d7ae93ac67186a9bd4dd81db85eab9ccd64334f /vnfs/DAaaS/microservices/prom-kafka-writer/README.md | |
parent | 68d118176bb53c36b31a7060cfa16ad5acac1765 (diff) |
Prometheus Kafka Writer Microservice
This patch implents Prometheus to remote Kafka Writer Microservice
Added sample day-2 config to configure prometheus
PS4: Fixed Review comments
Issue-ID: ONAPARC-393
Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
Change-Id: I0bc77175593a165effd7bb1cb4802c988a5ef4ec
Diffstat (limited to 'vnfs/DAaaS/microservices/prom-kafka-writer/README.md')
-rw-r--r-- | vnfs/DAaaS/microservices/prom-kafka-writer/README.md | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/vnfs/DAaaS/microservices/prom-kafka-writer/README.md b/vnfs/DAaaS/microservices/prom-kafka-writer/README.md new file mode 100644 index 00000000..8d981e1d --- /dev/null +++ b/vnfs/DAaaS/microservices/prom-kafka-writer/README.md @@ -0,0 +1,66 @@ +# Prometheus Kafka Remote Writer + +![Architecture Diagram](./diagram.png) + +Prometheus Kafka remote writer is a remote writer/adapter to publish metrics from prometheus to a remote storage like kafka. +The prom-kafka-writer microservice enables to register the remote endpoint and configures the kafka producer endpoint. +Prometheus can then be configured to set the remote write to this endpoint and the metrics can be published. + +---- +## Install +### Build docker images +```bash +git clone https://github.com/onap/demo.git +DA_WORKING_DIR=$PWD/demo/vnfs/DAaaS +cd $DA_WORKING_DIR/microservices/prom-kafka-writer +docker build -f Dockerfile.ci . -t prom-kafka-writer:latest +``` +### Deploy using Helm chart +```bash +cd $DA_WORKING_DIR/deploy/collection/charts/prom-kafka-writer + +# Modify the values.yaml +helm install -n pkw . -f values.yaml --namespace=edge1 +``` +Verify the deployment +```bash +kubectl get pods -n edge1 | grep prom-kafka-writer + +NAME READY STATUS RESTARTS AGE +pkw-prom-kafka-writer-c6c89c579-jv6jt 1/1 Running 0 11m +``` + +## API +* Create Prometheus Kafka Writer endpoint + +```bash + //Request + curl -X POST \ + http://prom-kafka-writer/pkw \ + -H 'Content-Type: application/json' \ + -d '{ + "bootstrap.servers": "kafka-cluster-kafka-bootstrap.kafka.svc.cluster.local:9091", + "topic": "topic1", + "usePartition": false, + "compression.codec": "snappy" + }' +``` + +* Delete Prometheus Kafka Writer endpoint + +```bash + //Request + curl -X DELETE http://prom-kafka-writer/pkw/pkw0 +``` + +* List Prometheus Kafka Writers +```bash + //Request + curl -X GET http://prom-kafka-writer/pkw +``` + +* Publish to Kafka Writer +```bash + //Request + curl -X POST http://prom-kafka-writer/pkw/pkw0/receive +``` |