Infrastructure Metrics Not Visible in OpsRamp Portal
Issue
Metrics are not visible in the OpsRamp portal even though the Kubernetes 2.0 agent pods are running.
Cause
- Metrics not enabled
- During integration, the metrics option was not enabled.
- Alternatively, the downloaded/copied manifest does not have metrics enabled for required components.
- Pipeline limitations
- The agent fetches metrics from Kubernetes components (API Server, Controller, Scheduler, etcd, kube-proxy, etc.). If metrics are not enabled, these pipelines will not process data.
- Cluster port changes
- The Kubernetes 2.0 agent assumes standard ports for Kubernetes components (e.g.,
kubeleton port10250). If ports are changed, the agent cannot collect metrics.
- The Kubernetes 2.0 agent assumes standard ports for Kubernetes components (e.g.,
- Kubernetes manifest configuration
- Some metrics (e.g., volume-related) require Kubernetes manifests to include a ConfigMap or PVC (PersistentVolumeClaim). Without these, metrics cannot be generated, as the limitation comes from OpenTelemetry, not the OpsRamp agent.
Solution
- Enable Metrics During Installation
- While configuring the Kubernetes 2.0 integration, ensure that metrics are enabled.
- Alternatively, edit the manifest and set the required components to true:
metrics: kubeCluster: true kubeApiServer: true kubeControllerManager: true kubeScheduler: true kubelet: true kubeletStats: true kubeProxy: true coreDNS: true etcd: true cAdvisor: true
- Verify Cluster Ports
- Confirm that Kubernetes components are running on their default ports.
- For example, kubelet should be accessible on port 10250. If ports are customized, update the manifests accordingly.
- Check Manifest Configuration
- If you need volume-related metrics, ensure your pod manifests include ConfigMaps or PVCs.
- Example: Attach a PVC in your pod spec to collect storage metrics.
- Review Infrastructure Metrics Config
- Check the ConfigMap:
kubectl get configmap opsramp-k8s-infra-metric-user-config -n <namespace> - Adjust the configuration as needed for infrastructure metric collection.
- Check the ConfigMap:
- Cross-check in Portal
- Once configurations are corrected, validate that metrics for all Kubernetes components are visible in the OpsRamp portal.
Infrastructure Metrics Troubleshooting
Common Scenarios & Impacts
| Scenario | Impact | Logs to Check |
|---|---|---|
| ConfigMap applied with correct syntax | Otel restarts, metrics exported | None |
| ConfigMap has missing fields / invalid syntax | Otel restarts, no infra pipeline runs | configuration error |
| ConfigMap has wrong configuration (wrong IP/Port/Credentials) | Otel restarts, no error, but skips that workload; other workloads continue to export metrics | Error scraping metrics |
Debugging Steps
- Check for Syntax Errors
Example:kubectl exec -it <worker-pod-name> -- sh cd /var/log/opsramp cat agent.log | grep "configuration error"error decoding 'collection_interval': expected type 'time.Duration', got type 'bool', value: 'true' - Correct the config values (e.g., use proper duration format).
- Validate Pipelines
- Once corrected, logs should list all Receivers, Exporters, Processors, Pipelines.
- If missing → configuration issue.