Kube-Prometheus监控Nacos(五)
Nacos
Endpoint
apiVersion: v1
kind: Endpoints
metadata:
name: nacos-exporter
namespace: monitoring
subsets:
- addresses:
- ip: # 列举 nacos 的机器的ip1
- ip: # 列举 nacos 的机器的ip2 ...
ports:
- name: http
port: 8848 # nacos-exporter 端口
protocol: TCP
Service
apiVersion: v1
kind: Service
metadata:
labels:
app: nacos-exporter
type: nacos
version: 1.4.4
platform: mos
name: nacos-exporter
namespace: monitoring
spec:
ports:
- port: 8848 # nacos-exporter 端口
protocol: TCP
targetPort: http
type: ClusterIP
ServiceMonitor
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: nacos-exporter
namespace: monitoring
spec:
endpoints:
- interval: 15s
path: /nacos/actuator/prometheus
port: http
targetLabels: [platform]
namespaceSelector:
matchNames:
- monitoring
selector:
matchLabels:
app: nacos-exporter
type: nacos
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 逐光の博客!
评论