diff --git a/manifests/home-apps-servicemonitor.yaml b/manifests/home-apps-servicemonitor.yaml new file mode 100644 index 0000000..d5d0801 --- /dev/null +++ b/manifests/home-apps-servicemonitor.yaml @@ -0,0 +1,16 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: home-apps-service-monitor + namespace: argocd +spec: + project: default + syncPolicy: + automated: {} + source: + repoURL: git@github.com:wahyd4/home-docker.git + targetRevision: master + path: servicemonitors + destination: + server: https://192.168.1.2:6443 + namespace: home-apps diff --git a/manifests/telegraf.yaml b/manifests/telegraf.yaml new file mode 100644 index 0000000..7ffff47 --- /dev/null +++ b/manifests/telegraf.yaml @@ -0,0 +1,128 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: telegraf + namespace: argocd +spec: + project: default + source: + chart: telegraf + repoURL: https://helm.influxdata.com + path: telegraf + targetRevision: 1.8.18 + helm: + releaseName: telegraf + # valueFiles: ['telegraf-values.yaml'] + values: | + replicaCount: 1 + env: + - name: HOSTNAME + value: "telegraf-polling-service" + ## Configure resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + resources: + requests: + memory: 128Mi + cpu: 100m + limits: + memory: 128Mi + cpu: 100m + ## Node labels for pod assignment + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + nodeSelector: {} + service: + enabled: true + type: ClusterIP + annotations: {} + serviceAccount: + # Specifies whether a ServiceAccount should be created + create: true + # The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: + ## Exposed telegraf configuration + ## For full list of possible values see `/docs/all-config-values.yaml` and `/docs/all-config-values.toml` + ## ref: https://docs.influxdata.com/telegraf/v1.1/administration/configuration/ + config: + agent: + interval: "30s" + round_interval: true + metric_batch_size: 1000 + metric_buffer_limit: 10000 + collection_jitter: "0s" + flush_interval: "30s" + flush_jitter: "0s" + precision: "" + debug: true + quiet: false + logfile: "" + hostname: "$HOSTNAME" + omit_hostname: false + processors: + - enum: + mapping: + field: "status" + dest: "status_code" + value_mappings: + healthy: 1 + problem: 2 + critical: 3 + outputs: + - prometheus_client: + listen: ":9126" + path: /metrics + expiration_interval: 1000s + string_as_label: true + inputs: + - github: + repositories: + - wahyd4/work-in-australia + - wahyd4/aria2-ariang-docker + - wahyd4/aria2-ariang-x-docker-compose + - wahyd4/knowledge-mind-mapping + access_token: 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 + http_timeout: 10s + - http: + interval: "900s" + urls: + - https://hub.docker.com/v2/repositories/wahyd4/ + method: GET + insecure_skip_verify: true + timeout: 5s + data_format: json + json_query: results + name_override: docker_hub + tag_keys: + - name + json_string_fields: + - name + - http: + interval: "900s" + urls: + - https://api.waqi.info/feed/chengdu/?token=97578eb58bcfb3ddb7280af6c6cb75df9add8200 + - https://api.waqi.info/feed/beijing/?token=97578eb58bcfb3ddb7280af6c6cb75df9add8200 + - https://api.waqi.info/feed/nanchong/?token=97578eb58bcfb3ddb7280af6c6cb75df9add8200 + - https://api.waqi.info/feed/neijiang/?token=97578eb58bcfb3ddb7280af6c6cb75df9add8200 + - https://api.waqi.info/feed/melbourne/?token=97578eb58bcfb3ddb7280af6c6cb75df9add8200 + method: GET + # headers: | + # {"User-Agent"= "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36"} + insecure_skip_verify: true + timeout: 10s + data_format: json + json_query: data + name_override: air_index + tag_keys: + - city_name + json_string_fields: + - city_name + json_time_key: time_s + json_time_format: "2006-01-02 15:04:05" + json_timezone: "Asia/Chongqing" + destination: + server: https://192.168.1.2:6443 + namespace: home-apps + syncPolicy: + automated: + prune: true + selfHeal: true