[Plugin] Prometheus unRAID Plugins


Recommended Posts

7 minutes ago, simo241 said:

I discover that console of adguard is not working when i open is automatically close

But AdGuard is working I think?

 

7 minutes ago, simo241 said:

But i can ping Ad guard from unraid

You can also try to open up a Unraid console and enter:

docker exec -ti CONTAINERNAME /bin/bash

(replace CONTAINERNAME with your container name <- case sensitive and maybe change /bin/bash to /bin/sh depending on the shell that is running in the container)

 

This is basically the same as when you open up a Console window from the container.

Link to comment
7 minutes ago, simo241 said:

hi, thank you for your help, with your help i been able to ping unraid from adguard

I confirm adguard is working but not the console

It seems then something else is wrong on your setup, I've now tried it again on my test system with a clean install from AdGuard, Prometheus, Grafana and the plugin and it works without a issue.

Link to comment
Open up the file /boot/config/plugins/prometheus_firtzbox_exporter/settings.cfg and edit the line where it says "fritz_additional=" so that it looks like:
fritz_additional=-gateway-url http://YOURIP:49000 -gateway-luaurl http://YOURIP

 
Of course insert the IP of your Fritzbox where it says YOURIP and stop the exporter first before doing this.

unfortunately it does not work for me. I followed your instructions for setting up the fritz box with a new user. is there a log I can check? when I start the plug in the status stays 'stopped'. thanks for your help

Gesendet von meinem SM-N986B mit Tapatalk

Link to comment
19 hours ago, shiz said:

unfortunately it does not work for me. I followed your instructions for setting up the fritz box with a new user. is there a log I can check? when I start the plug in the status stays 'stopped'. thanks for your help emoji120.png

You can try this: 

image.png.6f6dd92540fbfa07c94fdc3910cd7945.png

 

and doublecheck username/password and user permissions:

image.thumb.png.5f9d7a30445680f1031b177c3f6c00fa.png

even that upnp is activated

  • Thanks 1
Link to comment
  • 2 weeks later...

Hi Everyone,

 

I installed prometheus successfully however the container won't start.

I am using Unraid version: 6.10.1

Guide Used: Unraid | Unraid Data Monitoring with Prometheus and Grafana

Error Logs:

ts=2022-05-23T08:43:54.878Z caller=main.go:488 level=info msg="No time or size retention was set so using the default time retention" duration=15d
ts=2022-05-23T08:43:54.878Z caller=main.go:525 level=info msg="Starting Prometheus" version="(version=2.35.0, branch=HEAD, revision=6656cd29fe6ac92bab91ecec0fe162ef0f187654)"
ts=2022-05-23T08:43:54.878Z caller=main.go:530 level=info build_context="(go=go1.18.1, user=root@cf6852b14d68, date=20220421-09:53:42)"
ts=2022-05-23T08:43:54.878Z caller=main.go:531 level=info host_details="(Linux 5.15.40-Unraid #1 SMP Mon May 16 10:05:44 PDT 2022 x86_64 3dec108b666f (none))"
ts=2022-05-23T08:43:54.878Z caller=main.go:532 level=info fd_limits="(soft=40960, hard=40960)"
ts=2022-05-23T08:43:54.878Z caller=main.go:533 level=info vm_limits="(soft=unlimited, hard=unlimited)"
ts=2022-05-23T08:43:54.878Z caller=query_logger.go:90 level=error component=activeQueryTracker msg="Error opening query log file" file=/prometheus/queries.active err="open /prometheus/queries.active: permission denied"
panic: Unable to create mmap-ed active query log

goroutine 1 [running]:
github.com/prometheus/prometheus/promql.NewActiveQueryTracker({0x7ffd01d38e9d, 0xb}, 0x14, {0x3757500, 0xc00059b8b0})
        /app/promql/query_logger.go:120 +0x3d5
main.main()
        /app/cmd/prometheus/main.go:587 +0x61bf
ts=2022-05-23T08:44:03.171Z caller=main.go:488 level=info msg="No time or size retention was set so using the default time retention" duration=15d
ts=2022-05-23T08:44:03.171Z caller=main.go:525 level=info msg="Starting Prometheus" version="(version=2.35.0, branch=HEAD, revision=6656cd29fe6ac92bab91ecec0fe162ef0f187654)"
ts=2022-05-23T08:44:03.171Z caller=main.go:530 level=info build_context="(go=go1.18.1, user=root@cf6852b14d68, date=20220421-09:53:42)"
ts=2022-05-23T08:44:03.171Z caller=main.go:531 level=info host_details="(Linux 5.15.40-Unraid #1 SMP Mon May 16 10:05:44 PDT 2022 x86_64 3dec108b666f (none))"
ts=2022-05-23T08:44:03.171Z caller=main.go:532 level=info fd_limits="(soft=40960, hard=40960)"
ts=2022-05-23T08:44:03.171Z caller=main.go:533 level=info vm_limits="(soft=unlimited, hard=unlimited)"
ts=2022-05-23T08:44:03.171Z caller=query_logger.go:90 level=error component=activeQueryTracker msg="Error opening query log file" file=/prometheus/queries.active err="open /prometheus/queries.active: permission denied"
panic: Unable to create mmap-ed active query log

goroutine 1 [running]:
github.com/prometheus/prometheus/promql.NewActiveQueryTracker({0x7ffdc3a94e9d, 0xb}, 0x14, {0x3757500, 0xc00074f6d0})
        /app/promql/query_logger.go:120 +0x3d5
main.main()
        /app/cmd/prometheus/main.go:587 +0x61bf
ts=2022-05-23T08:50:35.294Z caller=main.go:488 level=info msg="No time or size retention was set so using the default time retention" duration=15d
ts=2022-05-23T08:50:35.294Z caller=main.go:525 level=info msg="Starting Prometheus" version="(version=2.35.0, branch=HEAD, revision=6656cd29fe6ac92bab91ecec0fe162ef0f187654)"
ts=2022-05-23T08:50:35.294Z caller=main.go:530 level=info build_context="(go=go1.18.1, user=root@cf6852b14d68, date=20220421-09:53:42)"
ts=2022-05-23T08:50:35.294Z caller=main.go:531 level=info host_details="(Linux 5.15.40-Unraid #1 SMP Mon May 16 10:05:44 PDT 2022 x86_64 3dec108b666f (none))"
ts=2022-05-23T08:50:35.294Z caller=main.go:532 level=info fd_limits="(soft=40960, hard=40960)"
ts=2022-05-23T08:50:35.294Z caller=main.go:533 level=info vm_limits="(soft=unlimited, hard=unlimited)"
ts=2022-05-23T08:50:35.295Z caller=query_logger.go:90 level=error component=activeQueryTracker msg="Error opening query log file" file=/prometheus/queries.active err="open /prometheus/queries.active: permission denied"
panic: Unable to create mmap-ed active query log

goroutine 1 [running]:
github.com/prometheus/prometheus/promql.NewActiveQueryTracker({0x7ffd1f0ede9d, 0xb}, 0x14, {0x3757500, 0xc000827090})
        /app/promql/query_logger.go:120 +0x3d5
main.main()
        /app/cmd/prometheus/main.go:587 +0x61bf
ts=2022-05-23T08:59:55.398Z caller=main.go:488 level=info msg="No time or size retention was set so using the default time retention" duration=15d
ts=2022-05-23T08:59:55.399Z caller=main.go:525 level=info msg="Starting Prometheus" version="(version=2.35.0, branch=HEAD, revision=6656cd29fe6ac92bab91ecec0fe162ef0f187654)"
ts=2022-05-23T08:59:55.399Z caller=main.go:530 level=info build_context="(go=go1.18.1, user=root@cf6852b14d68, date=20220421-09:53:42)"
ts=2022-05-23T08:59:55.399Z caller=main.go:531 level=info host_details="(Linux 5.15.40-Unraid #1 SMP Mon May 16 10:05:44 PDT 2022 x86_64 3dec108b666f (none))"
ts=2022-05-23T08:59:55.399Z caller=main.go:532 level=info fd_limits="(soft=40960, hard=40960)"
ts=2022-05-23T08:59:55.399Z caller=main.go:533 level=info vm_limits="(soft=unlimited, hard=unlimited)"
ts=2022-05-23T08:59:55.399Z caller=query_logger.go:90 level=error component=activeQueryTracker msg="Error opening query log file" file=/prometheus/queries.active err="open /prometheus/queries.active: permission denied"
panic: Unable to create mmap-ed active query log

goroutine 1 [running]:
github.com/prometheus/prometheus/promql.NewActiveQueryTracker({0x7ffd5b979e9d, 0xb}, 0x14, {0x3757500, 0xc0009879a0})
        /app/promql/query_logger.go:120 +0x3d5
main.main()
        /app/cmd/prometheus/main.go:587 +0x61bf

** Press ANY KEY to close this window ** 

 

Link to comment
5 minutes ago, Robert Sitavu said:

I installed prometheus successfully however the container won't start.

Please post this in the Prometheus Support Thread here, I've only written the Guide on how to install it in conjunction with my plugins and I'm not the maintainer from the Prometheus container.

  • Like 1
Link to comment
On 7/3/2021 at 4:25 PM, ich777 said:

Prometheus PiHole Exporter

 

Note: You can connect to any PiHole on your local network and of course if you run it on unRAID in a Docker container or VM.
 

  1. Download and install the Prometheus PiHole Exporter plugin from the CA App:
    30.png.0742e217e22991884b82f96a5734760c.png
     
  2. Go to the plugin settings by clicking on "Settings -> Pi-Hole Exporter (at the bottom of the Settings page)":
    31.png.9d499f93a0d944b9446e9457f77d8768.png
     
  3. Enter your IP from PiHole and also your API Token and click on "Confirm & Start":
    33.thumb.png.0f77eade3f95e850ccf63dc16a37ceff.png
    (Please note that if you run your PiHole in a Docker container in a Custom network like br0 you have to enable the option "Enable host access" in your Docker settings, otherwise the plugin can't connect to your PiHole instance)

    To get your API Token go to your PiHole instance, Login and click on "Settings -> API / Web interface -> Show API Token -> Yes, show API Token":
    32.png.2f18fadf85ff716ced9b63c802610c5f.png
    grafik.png.1e1b59162c5e064a7745fb9c47b444e8.png
     
  4. After that you should see in the right top corner that the Exporter is running and details about it:
    34.thumb.png.73e74cf0d91e623daba9cea84eb46929.png
     
  5. Open up the prometheus.yml (Step 4 + 5 from the first post), add a line with '- targets: ["YOURSERVERIP:9617"]' (please change "YOURSERVERIP" to your Server IP), save and close the file:
    35.png.b719c6d8ef5d5d5c1c498b561c5d10af.png
     
  6. Go to the Docker page and restart Prometheus:
    36.png.c707af89b70026229d55bf37f4e2760b.png
     
  7. Open up the Grafana WebUI:
    39.png.94e97735c8e51095afa5e2419b368910.png
     
  8. In Grafana click on "+ -> Import":
    20.png.63664aa075e25fc83087e05be0e50b94.png
     

  9. Now we are going to import a preconfigured Dashboard for the PiHole Exporter from Grafana.com (Source), to do this simply enter the ID (10176) from the Dasboard and click "Load":
    37.thumb.png.e9337afbe90955b0b06fb1b2b4f13cfe.png
     

  10. In the next screen rename the Dashboard to your liking and click on "Import"
     

  11. Now you should be greeted with something like this (please keep in mind that the Dashboard can display N/A at some values since there is not enough data available, wait a few minutes and you will see that the values are filled in):
    38.thumb.png.30b151b62f9dd9bdafe91dee31cccc06.png
    (Now you will notice that this warning: "Panel plugin not found: grafana-piechar-panel" appears on the Dasboard, to fix this follow the next steps)
     

  12. Go to your Docker page and click on Grafana and select "Console":
    39.png.480fbd464fb1790572e1abdec9efbfc6.png
     

  13. In the next window enter the following 'grafana-cli plugins install grafana-piechart-panel' and press RETURN:
    40.png.26fb73f31a6ebb7d1e8d009e7b81c1a6.png
     

  14. After that close the Console window and restart the Grafana Docker container:
    41.png.4c27febef332b244db87fc119a898789.png
     

  15. Now go back to your PiHole Dashboard within Grafana and you should now see that the Dasboard is fully loaded:
    42.thumb.png.ec5bb36b95ecd85986fd5ebbf9efa24a.png

 

 

 

ATTENTION

Please note if you restart your PiHole container the Exporter will stop and you have to manually start it from the plugin configuration page with the "START" button.

 

This is also applies if you have CA Backup installed and the container is beeing backed up.

 

To workaround that you don't have to manually restart it after each CA Backup do the following steps:

 

  1. Go to Settings and click on the bottom on "Backup/Restore Appdata":
    grafik.png.0045d5a3871d1f5740fcca147981c1a1.png
     
  2. Confirm the Warning that pops up and scroll all the way down to the bottom and click on "Show Advanced Settings":
    grafik.png.9efa350bcd19143bc41507d2df57e09b.png
     
  3. At Pi-Hole make sure that you click on the switch so that it shows "Don't Stop":
    grafik.png.70506f1b2641d2d30f837561a74bbc72.png
     
  4. Scroll down to the bottom and click "Apply":
    grafik.png.15a5a572f5ca76bdf74d3581679ca1df.png

 

 

NO DATA SHOWING UP IN THE PIHOLE DASHBOARD

If no data is showing up in the PiHole Dashboard it is most likely the case that you have configured another Datasource like Telegraf in Grafana, to solve this issue go to this post:

 

Hi, I can’t find the checkbox for enable host access.

Where do I find it?

At the moment I can’t access Pi-hole via the exporter.

 

Best regards,

Florian

Link to comment
  • 4 weeks later...
10 minutes ago, Masterwishx said:

What is the right way to add --storage.tsdb.retention.time=365d to prometheus.yml ?

also wanted to ask Grafana is not saving the values only shows what its getting ?

This is a question for the Prometheus or better speaking Grafana Support Thread.

Link to comment
On 2/28/2022 at 6:41 PM, Bitbass said:

I'm an old crusty IT guy and it doesn't make any sense to me either. This is the error I get from the Docker on the primary Unraid:337772225_ScreenShot2022-02-28at6_06_05PM.thumb.png.f5bb45a7e87ef288bd05f3ed27041c01.png

 

If I telnet to the primary Unraid and "curl http://172.16.172.30:9100/metrics" it just hangs indefinitely. If I "curl http://172.16.172.30:9100" I get an immediate response of the top level page with a link to the metrics page in the middle.

 

If I go to http://172.16.172.30:9100/metrics from my Mac mini, which is on the same network as the primary Unraid, I can browse to that, I can curl it, everything works.

 

If I telnet to the target Unraid and "curl http://172.16.172.30:9100/metrics" I get an immediate response. Not going to localhost, but the NIC's IP from itself. 

 

So, it's like something on the Primary Unraid, at the system level, is unhappy with the html response from the /metrics page on the target.

Upgraded to 6.10.3 on both systems and still having the problem. The primary is on a different subnet from the target, but the firewall that's in the middle isn't causing a problem for anything else. I can access the target metrics page from other systems next to the primary, and the primary can access an Ubuntu target at 172.16.172.31, right next to the Unraid target. When I curl from the primary Unraid cli to the target Unraid metrics page it just hangs indefinitely. 

 

Is it possible something related to DNS is getting stuck? I have different "names" on each Unraid system, but the primary is simply called "unraid". I can't really change that. Is it possible the target is somehow responding with "unraid" to the query and the primary is getting confused and looking at itself? Maybe the target is trying to resolve "unraid" and getting confused. Could that be happening with the exporter plugin?

 

Not sure that's what's going on. Here's the output from the curl:

 

root@unraid:~# curl -v http://172.16.172.30:9100/metrics
*   Trying 172.16.172.30:9100...
* Connected to 172.16.172.30 (172.16.172.30) port 9100 (#0)
> GET /metrics HTTP/1.1
> Host: 172.16.172.30:9100
> User-Agent: curl/7.83.1
> Accept: */*
> 
************hangs at this point and I quit out of it
^C
root@unraid:~# curl -v http://172.16.172.31:9100/metrics
*   Trying 172.16.172.31:9100...
* Connected to 172.16.172.31 (172.16.172.31) port 9100 (#0)
> GET /metrics HTTP/1.1
> Host: 172.16.172.31:9100
> User-Agent: curl/7.83.1
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: text/plain; version=0.0.4; charset=utf-8
< Date: Mon, 20 Jun 2022 16:38:29 GMT
< Transfer-Encoding: chunked
< 
*********** full normal scrape after this. I've truncated it.

 

Edited by Bitbass
Link to comment
1 minute ago, Bitbass said:

From the target, pinging "unraid" does not resolve. Unless there's something hard coded into the node exporter plugin related to "unraid", I'm at a loss.

Try to restart the Docker service once or do a server reboot and see if it fixes the issue.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.