{"id":13552192,"url":"https://github.com/docker-me/monitoring-local","last_synced_at":"2025-04-03T03:30:56.667Z","repository":{"id":217499937,"uuid":"341162696","full_name":"docker-me/monitoring-local","owner":"docker-me","description":"prometheus pushgateway alertmanager grafana traefik cadvisor docker-compose","archived":false,"fork":false,"pushed_at":"2021-03-09T21:29:47.000Z","size":70,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-03T23:34:19.340Z","etag":null,"topics":["alertmanager","cadvisor","docker-compose","grafana","prometheus","pushgateway","traefik"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/docker-me.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2021-02-22T10:31:38.000Z","updated_at":"2022-05-16T12:46:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"6db58746-0bc0-4406-af82-c242789d4a55","html_url":"https://github.com/docker-me/monitoring-local","commit_stats":null,"previous_names":["docker-me/monitoring-local"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker-me%2Fmonitoring-local","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker-me%2Fmonitoring-local/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker-me%2Fmonitoring-local/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docker-me%2Fmonitoring-local/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docker-me","download_url":"https://codeload.github.com/docker-me/monitoring-local/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246933312,"owners_count":20857046,"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","cadvisor","docker-compose","grafana","prometheus","pushgateway","traefik"],"created_at":"2024-08-01T12:02:00.364Z","updated_at":"2025-04-03T03:30:56.250Z","avatar_url":"https://github.com/docker-me.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# monitoring-local\n\n## Used Global Environments\nFILE: _.env_\nPlease following variable update before docker-compose project will be started.\n* `DKR_DATA_DIR=/full/path/of/the/repository`\n\n## Usage\nFULL/FIRST CONTAINER START\n```\n$ cd /full/path/of/the/repository\n$ docker-compose up -d\nOR\n$ docker-compose --env-file /full/path/of/the/file/.env --file /full/path/of/the/file/docker-compose.yml up -d\n```\n\nREMOVE THE CONTAINER\n```\n$ cd /full/path/of/the/repository\n$ docker-compose down\nOR\n$ docker-compose --env-file /full/path/of/the/file/.env --file /full/path/of/the/file/docker-compose.yml down\n```\n\nCONTAINER START, STOP or RESTART\n```\n$ cd /full/path/of/the/repository\n$ docker-compose [start|stop|restart]\nOR\n$ docker-compose --env-file /full/path/of/the/file/.env --file /full/path/of/the/file/docker-compose.yml [start|stop|restart]\n```\n### Used Versions\nThis docker-compose is used/tested only with UNIX operation systems. \n\n```\n$ docker version\nClient: Docker Engine - Community\n Version:           20.10.3\n API version:       1.41\n Go version:        go1.13.15\n Git commit:        48d30b5\n Built:             Fri Jan 29 14:33:21 2021\n OS/Arch:           linux/amd64\n Context:           default\n Experimental:      true\n\nServer: Docker Engine - Community\n Engine:\n  Version:          20.10.3\n  API version:      1.41 (minimum version 1.12)\n  Go version:       go1.13.15\n  Git commit:       46229ca\n  Built:            Fri Jan 29 14:31:32 2021\n  OS/Arch:          linux/amd64\n  Experimental:     false\n containerd:\n  Version:          1.4.3\n  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b\n runc:\n  Version:          1.0.0-rc92\n  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff\n docker-init:\n  Version:          0.19.0\n  GitCommit:        de40ad0\n```\n```\n$ docker-compose version\ndocker-compose version 1.28.2, build 67630359\ndocker-py version: 4.4.1\nCPython version: 3.7.9\nOpenSSL version: OpenSSL 1.1.0l  10 Sep 2019\n```\n\n## Components\n* traefik\n* cadvisor\n* prometheus\n* pushgateway\n* alertmanager\n* grafana\n\n### URLs\n#### Intern\nBelow are the used urls between the container:\n* http://cadvisor:8080\n* http://prometheus:9090\n* http://pushgateway:9091\n* http://alertmanager:9093\n* http://grafana:3000\n* http://blackbox:9115\n* http://web-httpd:80\n* http://web-nginx:80\n\n#### Extern\nWe can open the application im browser with following URLs:\n* http://cadvisor.localhost\n* http://prometheus.localhost\n* http://pushgateway.localhost\n* http://alertmanager.localhost\n* http://grafana.localhost \n* http://blackbox.localhost\n* http://web-httpd.localhost\n* http://web-nginx.localhost\n\nThis URLs are created from traefik.\n\n## traefik\n### commands by start\nBy default, the level is set to ERROR. Alternative logging levels are   \nDEBUG, PANIC, FATAL, ERROR, WARN, and INFO.  \n* `--log.level=DEBUG`  \n\nEnable the API in insecure mode, which means that the API will be available directly on the entryPoint named traefik.  \n* `--api.insecure=true`  \n\nEnabling docker provider:  \n* `--providers.docker=true`  \n\nDo not expose containers unless explicitly told so:  \n* `--providers.docker.exposedbydefault=false`  \n\nThe list of middlewares that are prepended by default to the list of middlewares of each router associated to the named entry point.  \n* `--entrypoints.web.address=:80`  \n\n\n### by the container (labels:)\nExplicitly tell Traefik to expose this container  \n* `traefik.enable=true`  \n\nThe domain the service will respond to  \n* ``traefik.http.routers.\u003ccontainer_name\u003e.rule=Host(`\u003ccontainer_name\u003e.localhost`)``  \n\nThe port of the container (external)\n* `traefik.port=\u003ccontainer_port\u003e`\n\nAllow request only from the predefined entry point named \"web\"  \n* `traefik.http.routers.whoami.entrypoints=web`  \n\n## cadvisor\n* https://prometheus.io/docs/guides/cadvisor/\n* https://github.com/google/cadvisor\n* https://hub.docker.com/r/google/cadvisor/\n\n## prometheus\n### config file\n* `./prometheus/prometheus.yml`  \n\n### alert rules file\n* `./prometheus/alert.rules.yml`  \n\n### commands by start\nOne of: `debug`, `info`, `warn`, `error`. Only prints messages with levels higher than that.\n* `--log.level=info`\n\nTo specify which configuration file to load  \n* `--config.file`  \n\nWhere Prometheus writes its database. Defaults to data/.  \n* `--storage.tsdb.path`  \n\nWhen to remove old data. Defaults to 15d.  \n* `--storage.tsdb.retention.time`  \n\nConsoles are exposed on `/consoles/`, and sourced from the directory pointed to by the following flag.  \n* `--web.console.templates`\n\nConsoles also have access to all the templates defined with `{{define \"templateName\"}}...{{end}}` found in `*.lib` files in the directory pointed to by the following flag.  \n* `--web.console.libraries`  \n\nThe following flag controls access to the administrative HTTP API, which includes functionality such as wiping all the existing metric groups. This is disabled by default. If enabled, administrative functionality will be accessible under the `/api/*/admin/` paths. This flag is important to use pushgateway.  \n* `--web.enable-admin-api`   \n\nPrometheus can reload its configuration at runtime. If the new configuration is not well-formed, the changes will not be applied. A configuration reload is triggered by sending a SIGHUP to the Prometheus process or sending a `HTTP POST` request to the `/-/reload` endpoint (when the following flag is enabled). This will also reload any configured rule files.  \n* `--web.enable-lifecycle`\n\n## pushgateway\n* https://github.com/prometheus/pushgateway\n\nOne of: `debug`, `info`, `warn`, `error`. Only prints messages with levels higher than that.\n* `--log.level=info`\n\nIf specified then enables the Admin API. It lets you perform certain destructive actions. More on that in the following sections.\n* `--web.enable-admin-api`\n\nIf specified then lets you shutdown the Pushgateway via the API.\n* `--web.enable-lifecycle`\n\n### example to PUSH data\nPush a single sample into the group identified by `{job=\"some_job\"}`.\nSince no type information has been provided, `some_metric` will be of type untyped.\n```\necho \"some_metric 3.14\" | curl --data-binary @- http://pushgateway.localhost/metrics/job/some_job\n```\n\nPush something more complex into the group identified by `{job=\"some_job\",instance=\"some_instance\"}`.\nNote how type information and help strings are provided. Those lines are optional, but strongly encouraged for anything more complex.\n```\ncat \u003c\u003cEOF | curl --data-binary @- http://pushgateway.localhost/metrics/job/some_job/instance/some_instance\n# TYPE some_metric counter\nsome_metric{label=\"val1\"} 42\n# TYPE another_metric gauge\n# HELP another_metric Just an example.\nanother_metric 2398.283\nEOF\n```\nERROR\n```\npushed metrics are invalid or inconsistent with existing metrics: collected metric \"some_metric\" { label:\u003cname:\"instance\" value:\"some_instance\" \u003e label:\u003cname:\"job\" value:\"some_job\" \u003e label:\u003cname:\"label\" value:\"val1\" \u003e counter:\u003cvalue:42 \u003e } is not a UNTYPED\n```\n\n## alertmanager\n### config file\n* `./prometheus/alertmanager.yml`\n\n### commands by start\n* `--config.file`  \n* `--storage.path`  \n\n\n## grafana\n### environmets\nPassword and User to use Grafana as administrator\n* GF_SECURITY_ADMIN_USER  \n* GF_SECURITY_ADMIN_PASSWORD  \n\n## exporter\n### blackbox\n* https://github.com/prometheus/blackbox_exporter\n* https://hub.docker.com/r/prom/blackbox-exporter\n* https://github.com/prometheus/blackbox_exporter/blob/master/example.yml\n* https://www.sethryder.com/blackbox-exporter-accessing-multiple-modules-and-targets-with-a-single-job/\n\nBlackbox Exporter by Prometheus is used to probe endpoints like HTTPS, HTTP, TCP, DNS, and ICMP. After you define the endpoint, the Blackbox exporter generates hundreds of metrics that can be visualized using Grafana. Measuring response time is the most important feature of the Blackbox exporter.\n\nBlackbox Exporter is a self-hosted solution. If you’re looking for something similar, but as SaaS or cloud-based, then you can try Grafana worldPing.\n\nBlackbox exporter configuration file.\n* --config.file=\"blackbox.yml\"\n\nThe address to listen on for HTTP requests.\n* --web.listen-address=\":9115\"\n\nIf true validate the config file and then exit.\n* --config.check=true\n\nOnly log messages with the given severity or above. One of: [debug, info, warn, error]\n* --log.level=info\n\nOutput format of log messages. One of: [logfmt, json]\n* --log.format=logfmt \n\n#### httpd\n* https://hub.docker.com/_/httpd\n\n#### ngix\n* https://hub.docker.com/_/nginx\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocker-me%2Fmonitoring-local","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocker-me%2Fmonitoring-local","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocker-me%2Fmonitoring-local/lists"}