1/18/2024 0 Comments Prometheus node exporter log file$kubectl logs node-exporter-c8cwp -namespace prometheus If you check the log output from a Node Exporter Pod using kubectl logs you can see the collectors that are active: Node Exporter has numerous collectors designed to gather OS and hardware metrics from various sources on a node. After a brief moment you can then check the configured Targets in Prometheus and you will see that node-exporter is now being successfully scraped. You can then use kubectl get pods -namespace prometheus to see the node-exporter Pod(s) being created by Kubernetes. Go ahead and install Node Exporter into your Kubernetes cluster by executing kubectl apply -f node-exporter.yaml. It includes a Kubernetes Service and ServiceMonitor to scrape metrics from all instances of Node Exporter. The above YAML will create a DaemonSet that launches the Node Exporter on each node in the Kubernetes cluster. honorLabels: true interval: 30s path: /metrics targetPort: 9100 jobLabel: node-exporter namespaceSelector: name: node-exporter port: 9100 protocol: TCP targetPort: 9100 selector:Īpp: node-exporter sessionAffinity: None type: ClusterIPĪpiVersion: /v1 kind: ServiceMonitor metadata:Īpp: node-exporter serviceMonitorSelector: prometheus name: node-exporter namespace: prometheus spec: effect: NoExecute operator: Exists volumes: mountPath: /host/sys name: sys readOnly: true hostNetwork: true hostPID: true restartPolicy: Always tolerations: mountPath: /host/proc name: proc readOnly: true containerPort: 9100 hostPort: 9100 name: metrics protocol: TCP resources: path.sysfs=/host/sys image: quay.io/prometheus/node-exporter:v0.18.1 imagePullPolicy: IfNotPresent name: node-exporter ports: ApiVersion: extensions/v1beta1 kind: DaemonSet metadata:Īpp: node-exporter name: node-exporter namespace: prometheus spec:Ĭ/safe-to-evict: "true" labels:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |