Prometheus job issue while using user credentials


i am trying to create a job in prometheus for a microservices deployed in development tenant as:

  • job_name: “testjob”
    scrape_interval: 60s
    scrape_timeout: 30s
    scheme: https
    username: ‘xyz’
    password: ‘xyz’
    • targets: [“xyz”]
      metrics_path: /service/xyz/prometheus

but my account getting locked as soon as i run the server, give me another way how can i create a job in prometheus for microservice deployed in tenant by not giving user credentials.

What is meant by “my account is getting locked”? Your Cumulocity user?
Could it be that you are providing the wrong credentials for your tenant and microservice? That would explain that your cumulocity user is locked attempting to get authenticated but with the wrong credentials for multiple times.

Normally you should not use your user credentials but ideally create a dedicated prometheus user in cumulocity that only gets the permission to call the prometheus endpoints of your microservice.

I described the process here:

Hi @Stefan_Witschel ,

i am using correct credentials only,
when try for the prod tenants it is working fine getting microservice metrics,
but for the dev tenant only my account is getting locked.

is there any way that i can use bearer token instead username and passowrd

I don’t think it’s an issue of basic auth or using a bearer token that your account is being locked at dev.
Can you compare the authentication setting of your prod with your dev tenant?