{"id":18581906,"url":"https://github.com/coder/observability","last_synced_at":"2025-04-10T11:35:39.638Z","repository":{"id":241953391,"uuid":"783286859","full_name":"coder/observability","owner":"coder","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-16T08:26:41.000Z","size":578,"stargazers_count":16,"open_issues_count":17,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T22:35:29.887Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coder.png","metadata":{"files":{"readme":"README.gotmpl","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-07T13:24:04.000Z","updated_at":"2025-03-29T13:46:33.000Z","dependencies_parsed_at":"2024-06-17T14:12:36.741Z","dependency_job_id":"c98b1d18-b0cb-453f-8c69-d1045700dd5e","html_url":"https://github.com/coder/observability","commit_stats":null,"previous_names":["coder/observability"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fobservability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fobservability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fobservability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fobservability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coder","download_url":"https://codeload.github.com/coder/observability/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208688,"owners_count":21065205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T00:08:17.456Z","updated_at":"2025-04-10T11:35:34.597Z","avatar_url":"https://github.com/coder.png","language":"Go","readme":"\u003c!-- generated: do not edit manually! --\u003e\n\u003c!-- see scripts/README.gotmpl --\u003e\n\n# Coder Observability Chart\n\n\u003e [!NOTE]\n\u003e This Helm chart is in BETA; use with caution\n\n## Overview\n\nThis chart contains a highly opinionated set of integrations between Grafana, Loki, Prometheus, Alertmanager, and\nGrafana Agent.\n\nDashboards, alerts, and runbooks are preconfigured for monitoring [Coder](https://coder.com/) installations.\n\nOut of the box:\n\nMetrics will be scraped from all pods which have a `prometheus.io/scrape=true` annotation.\u003cbr\u003e\nLogs will be scraped from all pods in the Kubernetes cluster.\n\n## Installation\n\n\u003c!-- TODO: auto-update version here from publish script --\u003e\n\n```bash\nhelm repo add coder-observability https://helm.coder.com/observability\nhelm upgrade --install coder-observability coder-observability/coder-observability --version 0.1.1 --namespace coder-observability --create-namespace\n```\n\n## Requirements\n\n### General\n\n- Helm 3.7+\n\n### Coder\n\n\u003cdetails open\u003e\n\u003csummary\u003eKubernetes-based deployments\u003c/summary\u003e\n  If your installation is not in a namespace named `coder`, you will need to modify:\n\n```yaml\nglobal:\n  coder:\n    controlPlaneNamespace: \u003cyour namespace\u003e\n    externalProvisionersNamespace: \u003cyour namespace\u003e\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eNon-Kubernetes deployments (click to expand)\u003c/summary\u003e\n  Ensure your Coder installation is accessible to the resources created by this chart.\n\nSet `global.coder.scrapeMetrics` such that the metrics can be scraped from your installation, e.g.:\n\n```yaml\nglobal:\n  coder:\n    scrapeMetrics:\n      hostname: your.coder.host\n      port: 2112\n      scrapeInterval: 15s\n      additionalLabels:\n        job: coder\n```\n\nIf you would like your logs scraped from a process outside Kubernetes, you need to mount the log file(s) in and\nconfigure Grafana Agent to scrape them; here's an example configuration:\n\n```yaml\ngrafana-agent:\n  agent:\n    mounts:\n      extra:\n        - mountPath: /var/log\n          name: logs\n          readOnly: true\n  controller:\n    volumes:\n      extra:\n        - hostPath:\n            path: /var/log\n          name: logs\n\n  extraBlocks: |-\n    loki.source.file \"coder_log\" {\n      targets    = [\n        {__path__ = \"/var/log/coder.log\", job=\"coder\"},\n      ]\n      forward_to = [loki.write.loki.receiver]\n    }\n```\n\n\u003c/details\u003e\n\nEnsure these environment variables are set in your Coder deployment:\n\n- `CODER_PROMETHEUS_ENABLE=true`\n- `CODER_PROMETHEUS_COLLECT_AGENT_STATS=true`\n- `CODER_LOGGING_HUMAN=/dev/stderr` (only `human` log format is supported\n  currently; [issue](https://github.com/coder/observability/issues/8))\n\nEnsure these labels exist on your Coder \u0026 provisioner deployments:\n\n- `prometheus.io/scrape=true`\n- `prometheus.io/port=2112` (ensure this matches the port defined by `CODER_PROMETHEUS_ADDRESS`)\n\nIf you use the [`coder/coder` helm chart](https://github.com/coder/coder/tree/main/helm), you can use the\nfollowing:\n\n```yaml\ncoder:\n  podAnnotations:\n    prometheus.io/scrape: \"true\"\n    prometheus.io/port: \"2112\"\n```\n\nFor more details, see\nthe [coder documentation on exposing Prometheus metrics](https://coder.com/docs/v2/latest/admin/prometheus).\n\n### Postgres\n\nYou may configure the Helm chart to monitor your Coder deployment's Postgres server. Ensure that the resources created\nby this Helm chart can access your Postgres server.\n\nCreate a secret with your Postgres password and reference it as follows, along with the other connection details:\n\n```yaml\nglobal:\n  postgres:\n    hostname: \u003cyour postgres server host\u003e\n    port: \u003cpostgres port\u003e\n    database: \u003ccoder database\u003e\n    username: \u003cdatabase username\u003e\n    mountSecret: \u003cyour secret name here\u003e\n```\n\nThe secret should be in the form of `PGPASSWORD=\u003cyour password\u003e`, as this secret will be used to create an environment\nvariable.\n\n```yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: pg-secret\n  namespace: coder-observability\ndata:\n  PGPASSWORD: \u003cbase64-encoded password\u003e\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ePostgres metrics (click to expand)\u003c/summary\u003e\n\nA tool called [`postgres-exporter`](https://github.com/prometheus-community/postgres_exporter) is used to scrape metrics\nfrom your Postgres server, and you can see the metrics it is exposing as follows:\n\n```bash\nkubectl -n coder-observability port-forward statefulset/postgres-exporter 9187\n\ncurl http://localhost:9187/metrics\n```\n\n\u003c/details\u003e\n\n### Grafana\n\nTo access Grafana, run:\n\n```bash\nkubectl -n coder-observability port-forward svc/grafana 3000:80\n```\n\nAnd open your web browser to http://localhost:3000/.\n\nBy default, Grafana is configured to allow anonymous access; if you want password authentication, define this in\nyour `values.yaml`:\n\n```yaml\ngrafana:\n  admin:\n    existingSecret: grafana-admin\n    userKey: username\n    passwordKey: password\n  grafana.ini:\n    auth.anonymous:\n      enabled: false\n```\n\nYou will also need to define a secret as follows:\n\n```yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: grafana-admin # this matches the \"existingSecret\" field above\nstringData:\n  username: \"\u003cyour username\u003e\" # this matches the \"userKey\" field above\n  password: \"\u003cyour password\u003e\" # this matches the \"passwordKey\" field above\n```\n\n## Subcharts\n\n{{ template \"chart.requirementsTable\" . }}\n\nEach subchart can be disabled by setting the `enabled` field to `false`.\n\n| Subchart        | Setting                 |\n|-----------------|-------------------------|\n| `grafana`       | `grafana.enabled`       |\n| `grafana-agent` | `grafana-agent.enabled` |\n| `loki`          | `loki.enabled`          |\n| `prometheus`    | `prometheus.enabled`    |\n\n## Values\n\nThe `global` values are the values which pertain to this chart, while the rest pertain to the subcharts.\nThese values represent only the values _set_ in this chart. For the full list of available values, please see each\nsubchart.\n\nFor example, the `grafana.replicas` value is set by this chart by default, and is one of hundreds of available\nvalues which are defined [here](https://github.com/grafana/helm-charts/tree/main/charts/grafana#configuration).\n\n{{ template \"chart.valuesTable\" . }}\n\n{{ template \"helm-docs.versionFooter\" . }}\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Fobservability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoder%2Fobservability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Fobservability/lists"}