Open gowrisankar22 opened 4 years ago
aaah that's weird - did prometheus find it as a target? did you get any response from the metrics endpoint? you can try kubectl exec
'in into the container and then hitting the prometheus port - if that gives you something, it's probably something to do with how prometheus is scraping it
@cirocosta I can find the target but it is empty there is no status in it (up or down). Also container port also seems to be fine. seems like Prometheus scrapping issue. How exactly your setup is working?
Can you share the service monitor spec and verify the example/kubernetes.yaml is upto date ?
hmmmm interesting
we actually don't use the Prometheus operator - we add a label to every service that we want their endpoint to be discovered, e.g.:
service:
type: ClusterIP
port: 9001
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9001"
which then gets discovered by this service discovery config:
https://github.com/concourse/hush-house/blob/72dc4f62df12fd0240b1af3c39b70f63d2c89527/deployments/with-creds/metrics/values.yaml#L47-L52
@cirocosta Thanks a lot. scraper configuration that you gave did the trick. Now everything works like a charm
Few more questions:
kubernetes.yml file has a secret for concourse username and password and you did the secrets can be consumable via env but it is not working.
https://github.com/cirocosta/slirunner/blob/master/examples/kubernetes.yaml#L3-L16
COMMAND FAILURE---
error: expected argument for flag `-u, --username’, but got option `-p’
{“timestamp”:“1585632833.303583860",“source”:“slirunner”,“message”:“slirunner.run.login.finish”,“log_level”:2,“data”:{“error”:“command execution failed: exit status 1",“session”:“1.1"}}
it works only when if you pass the user credentials like below.
command:
- start
- --target=test
- --concourse-url=http://web:8080
- --password=test
- --username=test
I have created a PR to read from env: #4
Also, can you let me know how often these tests run and some more details? because it is really a cool thing for monitoring concourse.
Hello @cirocosta
I have tried running sli runner in my concourse setup but I am not able to scrape any metrics.
Steps:
logs: