# grafana_af2c self-hosting grafana for monitoring: - Server data (e.g disk usage) - presence monitoring (subscribers to all platform, activity and shit) for the AF2C - for communes dependencies (for debian): what I've installed: - docker-clean/stable,now 2.0.4-5 all [installed] - docker-compose/stable,now 1.29sudo docker-compose up.2-3 all [installed] - docker-doc/stable,now 20.10.24+dfsg1-1 all [installed] - docker-registry/stable,now 2.8.2+ds1-1 amd64 [installed] - docker.io/stable,now 20.10.24+dfsg1-1+b3 amd64 [installed] - docker/stable,now 1.5-2 all [installed] 1. we need to set up alone grafana. we will use docker-compose for this 1.1 prepare working directory for grafana and configs for it mkdir grafana-docker 1.2 prepare docker-compose.yaml touch docker-compose.yml 1.3 edit docker-compose.yml (I will give docker-compose.yml) DISCLAIMER: we will use bind mounts 1.4 everything is ready? then we start up container sudo docker-compose up and connect with localhost (by default it should be localhost:3000) 2. because we start with monitoring what's going on our own server, we will deploy prometheus and node_exporter now. let's start with node_exporter becasue this is the source of data about our server 2.1 add docker config for node exporter 2.2 add docker config for prometheus HUGE DISCLAIMER ABOUT NETWORKING: technically, every application has own container which mean it also has its own networking rules. for tests, I connected it together that: 1. turn on containers: docker-compose up -d 2. list working containers: docker ps 3. inspect them: docker inspect 4. look for "NetworkSettings" and sub-category Networks 5. look for value in "IPAddress" because this is our "localhost" for particular container 6. take this value and get access to container with this pattern http://:assigned_port