{"id":18445904,"url":"https://github.com/voronenko/dck-nano-observer","last_synced_at":"2026-01-24T01:30:48.363Z","repository":{"id":145345011,"uuid":"148629129","full_name":"Voronenko/dck-nano-observer","owner":"Voronenko","description":"dockerized setup to setup mini-monitoring for home \"zoo\"","archived":false,"fork":false,"pushed_at":"2018-09-23T12:28:11.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T01:49:38.273Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Voronenko.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-09-13T11:40:46.000Z","updated_at":"2018-09-23T12:28:12.000Z","dependencies_parsed_at":"2023-07-03T09:17:31.066Z","dependency_job_id":null,"html_url":"https://github.com/Voronenko/dck-nano-observer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fdck-nano-observer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fdck-nano-observer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fdck-nano-observer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fdck-nano-observer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Voronenko","download_url":"https://codeload.github.com/Voronenko/dck-nano-observer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991539,"owners_count":21194894,"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-06T07:07:50.893Z","updated_at":"2026-01-24T01:30:48.316Z","avatar_url":"https://github.com/Voronenko.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"dck-nano-observer\n=================\n\n[![Build Status](https://travis-ci.com/Voronenko/dck-nano-observer.svg?branch=master)](https://travis-ci.com/Voronenko/dck-nano-observer)\n\n\n## Preparing openhabian box for docker role\n\n```\nsudo apt install -y \\\n     apt-transport-https \\\n     ca-certificates \\\n     curl \\\n     gnupg2 \\\n     software-properties-common\n\ncurl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo \"$ID\")/gpg | sudo apt-key add -\n\necho \"deb [arch=armhf] https://download.docker.com/linux/$(. /etc/os-release; echo \"$ID\") \\\n     $(lsb_release -cs) stable\" | \\\n    sudo tee /etc/apt/sources.list.d/docker.list\n\nsudo apt update\nsudo apt install docker-ce\n\n```\n\n```\nsudo systemctl enable docker\nsudo systemctl start docker\n```\n\n```\nsudo docker run --rm arm32v7/hello-world\n```\n\n```\nsudo usermod -aG docker $USER\n```\n\n```\nsudo pip install docker-compose\n```\n\n## Reporting metrics to push gateway\n\n```sh\n  echo \"some_metric 3.14\" | curl --data-binary @- http://pushgateway.example.org:9091/metrics/job/some_job\n```\n\nfor local test that would be \n\n```sh\n  echo \"some_metric 3.14\" | curl --data-binary @- http://localhost:9091/metrics/job/some_job\n```\n\n\n## Observation of the flow\n\nhttp://localhost:8880/dashboard/\n\n\n\n\n## Perversions\n\nIf , for _some_ reason your prometheus server is not in one network with monitored sites (which generally is NOT recommended), there are still hakish way to accomplish polling.\nIn order to do so, you need push gateway on prometheus site, and series of regular cron jobs, kind of \n\n```sh\ncurl -s http://localhost:9100/metrics | curl --data-binary @- http://pushgateway.example.org:9091/metrics/job/some_job/instance/some_instance\n```\n\ndepending on granularity you would like to achieve, perversions might be even deeper.  For example, to get updates more often than once per minute, saying each 15 secs,\nyou can use next hack:\n\n```\n* * * * * for i in 0 1 2 3; do curl -s http://localhost:9100/metrics | curl --data-binary @- http://observer.docker.localhost:81/push/metrics/job/node/instance/openhabpi \u0026 sleep 15; done; echo \"OK\"\n* * * * * for i in 0 1 2 3; do curl -s http://localhost:9266/metrics | curl --data-binary @- http://observer.docker.localhost:81/push/metrics/job/openhab/instance/openhabpi \u0026 sleep 15; done; echo \"OK\"\n```\n\nP.S.\n\nThirdparty ideas used:\n\n-  https://github.com/nopp/grafana_alpine , - slightly refactored + fixed moved key\n\n-  https://github.com/m3db/m3 - m3 family Dockerfiles\n\n-  https://github.com/napnap75/rpi-prometheus  - openhabian/rpi slave images\n\n-  https://github.com/KuguHome/openhab-prometheus-metrics - prometheus compatible metrics from openhabian\n\nTemporary:\n\n- https://hub.docker.com/r/jcollie/openhab-exporter/\n\n\nFurther idea:\n\nhttps://github.com/robustperception/pushprox\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoronenko%2Fdck-nano-observer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoronenko%2Fdck-nano-observer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoronenko%2Fdck-nano-observer/lists"}