apiVersion: v1 kind: ConfigMap metadata: name: aliyun-exporter-config namespace: monitoring data: aliyun-exporter.yml: |- credential: access_key_id: LTAI5tHWwqeTbx7njrG45W6T access_key_secret: HXhuWdT1zVlTpFGTt0ABPq7G3VC89n region_id: cn-hangzhou metrics: acs_ecs_dashboard: - name: CPUUtilization period: 60 - name: DiskReadBPS period: 60 - name: DiskReadIOPS period: 60 - name: diskusage_utilization period: 15 - name: DiskWriteBPS period: 60 - name: DiskWriteIOPS period: 60 - name: fs_inodeutilization period: 15 - name: InternetIn period: 60 - name: InternetOut period: 60 - name: IntranetIn period: 60 - name: IntranetOut period: 60 - name: load_15m period: 15 - name: load_1m period: 15 - name: load_5m period: 15 - name: memory_actualusedspace period: 15 - name: memory_totalspace period: 15 - name: memory_usedspace period: 15 - name: memory_usedutilization period: 15 - name: net_tcpconnection period: 15 acs_rds_dashboard: - name: ConnectionUsage period: 60 - name: CpuUsage period: 60 - name: DataDelay period: 60 - name: DiskUsage period: 60 - name: IOPSUsage period: 60 - name: MemoryUsage period: 60 - name: MySQL_ActiveSessions period: 60 - name: MySQL_NetworkInNew period: 60 - name: MySQL_NetworkOutNew period: 60 - name: Rt period: 30 - name: TPS period: 30 acs_kvstore: - name: ConnectionUsage period: 60 - name: CpuUsage period: 60 - name: FailedCount period: 60 - name: IntranetIn period: 60 - name: IntranetInRatio period: 60 - name: IntranetOut period: 60 - name: IntranetOutRatio period: 60 - name: MemoryUsage period: 60 - name: Rt period: 10 acs_slb_dashboard: - name: ActiveConnection period: 60 - name: DropConnection period: 60 - name: DropPacketRX period: 60 - name: DropPacketTX period: 60 - name: DropTrafficRX period: 60 - name: DropTrafficTX period: 60 - name: MaxConnection period: 60 - name: NewConnection period: 60 - name: Qps period: 60 - name: Rt period: 60 - name: StatusCode2xx period: 60 - name: StatusCode3xx period: 60 - name: StatusCode4xx period: 60 - name: StatusCode5xx period: 60 - name: TrafficRXNew period: 60 - name: TrafficTXNew period: 60 - name: UnhealthyServerCount period: 60 - name: UpstreamCode4xx period: 60 - name: UpstreamCode5xx period: 60 - name: UpstreamRt period: 60 - name: HeathyServerCount period: 60 acs_mongodb: - name: CPUUtilization period: 60 - name: ConnectionAmount period: 60 - name: ConnectionUtilization period: 60 - name: DataDiskAmount period: 60 - name: DiskUtilization period: 60 - name: MemoryUtilization period: 60 - name: GroupCPUUtilization period: 60 - name: GroupConnectionUtilization period: 60 - name: GroupDiskUtilization period: 60 - name: GroupIOPSUtilization period: 60 - name: GroupMemoryUtilization period: 60 info_metrics: - ecs - rds - redis --- apiVersion: apps/v1 kind: Deployment metadata: name: aliyun-exporter namespace: monitoring spec: minReadySeconds: 5 replicas: 1 selector: matchLabels: app: aliyun-exporter strategy: rollingUpdate: maxSurge: 50% maxUnavailable: 0 type: RollingUpdate template: metadata: annotations: app_name: aliyun-exporter project: aliyun-exporter labels: app: aliyun-exporter project: aliyun-exporter spec: affinity: nodeAffinity: preferredDuringSchedulingIgnoredDuringExecution: - preference: matchExpressions: - key: prometheus operator: In values: - "1" weight: 100 - preference: matchExpressions: - key: kubernetes.io/os operator: In values: - linux weight: 10 requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: prometheus operator: In values: - "1" - matchExpressions: - key: kubernetes.io/os operator: In values: - linux containers: - name: aliyun-exporter image: registry.cn-hangzhou.aliyuncs.com/zhengyu1992/aliyun-exporter:0.3.1 imagePullPolicy: IfNotPresent restartPolicy: Always livenessProbe: failureThreshold: 2 initialDelaySeconds: 15 periodSeconds: 10 successThreshold: 1 tcpSocket: port: 9525 timeoutSeconds: 5 ports: - containerPort: 9525 protocol: TCP readinessProbe: failureThreshold: 2 initialDelaySeconds: 15 periodSeconds: 10 successThreshold: 1 tcpSocket: port: 9525 timeoutSeconds: 5 resources: limits: cpu: "500m" memory: 1Gi requests: cpu: "100m" memory: 100Mi volumeMounts: - mountPath: /etc/aliyun-exporter name: config readOnly: true volumes: - configMap: defaultMode: 420 name: aliyun-exporter-config name: config --- apiVersion: v1 kind: Service metadata: name: aliyun-exporter namespace: monitoring spec: selector: app: aliyun-exporter ports: - name: aliyun-exporter port: 9525 targetPort: 9525