{"id":15062631,"url":"https://github.com/inovex/trovilo","last_synced_at":"2025-04-10T10:08:35.834Z","repository":{"id":139542805,"uuid":"124702938","full_name":"inovex/trovilo","owner":"inovex","description":"trovilo collects and prepares files from Kubernetes ConfigMaps for Prometheus \u0026 friends","archived":false,"fork":false,"pushed_at":"2019-05-21T07:14:02.000Z","size":54,"stargazers_count":16,"open_issues_count":7,"forks_count":4,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-24T09:02:43.525Z","etag":null,"topics":["alertmanager","alerts","configmap","dashboards","grafana","kubernetes","monitoring","prometheus"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inovex.png","metadata":{"files":{"readme":"README.md","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":"2018-03-10T22:16:08.000Z","updated_at":"2021-11-19T14:18:13.000Z","dependencies_parsed_at":"2024-06-20T10:21:49.067Z","dependency_job_id":"504ecf35-1126-445b-acab-f7cf49c8138f","html_url":"https://github.com/inovex/trovilo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inovex%2Ftrovilo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inovex%2Ftrovilo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inovex%2Ftrovilo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inovex%2Ftrovilo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inovex","download_url":"https://codeload.github.com/inovex/trovilo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248198884,"owners_count":21063628,"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":["alertmanager","alerts","configmap","dashboards","grafana","kubernetes","monitoring","prometheus"],"created_at":"2024-09-24T23:43:56.482Z","updated_at":"2025-04-10T10:08:35.814Z","avatar_url":"https://github.com/inovex.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trovilo\n\n[![Build Status](https://travis-ci.org/inovex/trovilo.png?branch=master)](https://travis-ci.org/inovex/trovilo)\n[![Go Report Card](https://goreportcard.com/badge/github.com/inovex/trovilo)](https://goreportcard.com/report/github.com/inovex/trovilo)\n[![Docker Pulls](https://img.shields.io/docker/pulls/inovex/trovilo.svg?maxAge=604800)](https://hub.docker.com/r/inovex/trovilo/)\n\ntrovilo collects and prepares files from Kubernetes ConfigMaps for Prometheus \u0026 friends.\n\n## Philosophy\n\nThis simple helper tool aims to collect ConfigMaps (files) via the Kubernetes API and writes them down into the filesystem, that may be internally processed by apps like Prometheus or Grafana. It focuses to serve this purpose only on a very generic way. This means it's not meant to work with a specific app only and won't contain such specific code. Instead we try to provide an extensive UI and try keep the code maintainable.\n\nContributions are highly appreciated. :)\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.\n\nSetup your GO environment if not already done:\n\n```\n$ export GOPATH=${HOME}/GOPATH GOBIN=${HOME}/GOPATH/bin\n```\n\n```\n$ go get -u github.com/inovex/trovilo/cmd/trovilo\n$ $GOBIN/trovilo --help\nusage: trovilo --config=CONFIG [\u003cflags\u003e]\n\nTrovilo collects and prepares files from Kubernetes ConfigMaps for Prometheus \u0026 friends\n\nFlags:\n  -h, --help                   Show context-sensitive help (also try --help-long and --help-man).\n      --config=CONFIG          YAML configuration file.\n      --kubeconfig=KUBECONFIG  Optional kubectl configuration file. If undefined we expect trovilo is running in a pod.\n      --log-level=\"info\"       Specify log level (debug, info, warn, error).\n      --log-json               Enable JSON-formatted logging on STDOUT.\n  -v, --version                Show application version.\n```\n\n## Deployment\n\nDeploy the binary to your target systems or use the [official Docker image](https://hub.docker.com/r/inovex/trovilo/). Notice: The *tools*-tagged Docker image additionally contains useful tools for verify or post-deploy commands.\n\nSimple trovilo example configuration file:\n\n```\n$ cat trovilo-config.yaml\n# Which namespace to check (empty string means all namespaces)\n#namespace: \"\"\njobs:\n  # Arbitrary name for identification (and troubleshooting in logs)\n  - name: alert-rules\n    # Kubernetes-styled label selector to define how to find ConfigMaps\n    selector:\n      type: prometheus-alerts\n    verify:\n      # Example verification step to check whether the contents of the ConfigMap are valid Prometheus alert files. %s will be replaced by the ConfigMap's file path(s).\n      - name: verify alert rule validity\n        cmd: [\"promtool\", \"check\", \"rules\", \"%s\"]\n    target-dir: /etc/prometheus-alerts/\n    # Enable directory flattening so all ConfigMap files will be placed into a single directory\n    flatten: true\n    # After successfully verifying the ConfigMap and deploying it into the target-dir, run the following commands to trigger (e.g. Prometheus) manual config reloads\n    post-deploy:\n      - name: reload prometheus\n        cmd: [\"curl\", \"-s\", \"-X\", \"POST\", \"http://localhost:9090/-/reload\"]\n  # Another job example, but for Grafana dashboards (JSON model)\n  - name: grafana-dashboards\n    selector:\n      type: grafana-dashboards\n    target-dir: tmp/target-grafana-dashboards/\n```\n\nFull example Kubernetes deployment with Prometheus:\n\n```\n$ kubectl apply \\\n  -f https://raw.githubusercontent.com/inovex/trovilo/master/examples/k8s/alert-rules-team1.yaml \\\n  -f https://raw.githubusercontent.com/inovex/trovilo/master/examples/k8s/prometheus-config.yaml \\\n  -f https://raw.githubusercontent.com/inovex/trovilo/master/examples/k8s/trovilo-config.yaml \\\n  -f https://raw.githubusercontent.com/inovex/trovilo/master/examples/k8s/deployment.yaml\n```\n## Alternatives\n\nSome projects with very similar use case(s):\n\n* [PierreVincent/k8s-grafana-watcher](https://github.com/PierreVincent/k8s-grafana-watcher)\n* [nordstrom/prometheusRuleLoader](https://github.com/nordstrom/prometheusRuleLoader)\n* [stakater/Reloader](https://github.com/stakater/Reloader)\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finovex%2Ftrovilo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finovex%2Ftrovilo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finovex%2Ftrovilo/lists"}