hawkular_openshift_agent_cm.j2 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. id: hawkular-openshift-agent
  2. kind: ConfigMap
  3. apiVersion: v1
  4. name: Hawkular OpenShift Agent Configuration
  5. metadata:
  6. name: hawkular-openshift-agent-configuration
  7. labels:
  8. metrics-infra: agent
  9. namespace: {{openshift_metrics_hawkular_agent_namespace}}
  10. data:
  11. config.yaml: |
  12. kubernetes:
  13. tenant: ${POD:namespace_name}
  14. hawkular_server:
  15. url: https://hawkular-metrics.openshift-infra.svc.cluster.local
  16. credentials:
  17. username: secret:openshift-infra/hawkular-metrics-account/hawkular-metrics.username
  18. password: secret:openshift-infra/hawkular-metrics-account/hawkular-metrics.password
  19. ca_cert_file: secret:openshift-infra/hawkular-metrics-certs/ca.crt
  20. emitter:
  21. status_enabled: false
  22. collector:
  23. minimum_collection_interval: 10s
  24. default_collection_interval: 30s
  25. metric_id_prefix: pod/${POD:uid}/custom/
  26. tags:
  27. metric_name: ${METRIC:name}
  28. description: ${METRIC:description}
  29. units: ${METRIC:units}
  30. namespace_id: ${POD:namespace_uid}
  31. namespace_name: ${POD:namespace_name}
  32. node_name: ${POD:node_name}
  33. pod_id: ${POD:uid}
  34. pod_ip: ${POD:ip}
  35. pod_name: ${POD:name}
  36. pod_namespace: ${POD:namespace_name}
  37. hostname: ${POD:hostname}
  38. host_ip: ${POD:host_ip}
  39. labels: ${POD:labels}
  40. type: pod
  41. collector: hawkular_openshift_agent
  42. custom_metric: true
  43. hawkular-openshift-agent: |
  44. endpoints:
  45. - type: prometheus
  46. protocol: "http"
  47. port: 8080
  48. path: /metrics
  49. collection_interval: 30s
  50. metrics:
  51. - name: hawkular_openshift_agent_metric_data_points_collected_total
  52. - name: hawkular_openshift_agent_monitored_endpoints
  53. - name: hawkular_openshift_agent_monitored_pods
  54. - name: hawkular_openshift_agent_monitored_metrics