Code Monkey home page Code Monkey logo

Comments (44)

TheCry avatar TheCry commented on July 4, 2024

Did you add an user to the FritzBox for collecting datas and put the credentials to https://github.com/TheCry/synology-fritzbox-grafana/blob/main/collectd-fritzbox/fritzcollectd.conf
This file must be uploaded to "fritzcollectd.conf" of your NAS.
Which credentials has your FritzBox User?

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

Yes, I copied its content and replaced IP, username and password with my configuration
The path to the file is entered correctly, I renamed the folder after the screenshot

grafik

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

Ok.. Login with SSH to your NAS and switch to "root" with "sudo su -" and your password.
Then run: docker exec -ti space2place-synology-fritzbox-grafana bash
You will switch inside the docker container.
Inside the container run: /etc/init.d/collectd status
and tell me the status.

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

It says collectd is running.

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

Exists the folder "collectd": ls -la /var/lib/influxdb/data/

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

It seems like it does not
This is the output

ls -la /var/lib/influxdb/data/
total 16
drwxrwx--- 4 influxdb influxdb 4096 Dec 14 02:06 .
drwxrwx--- 5 influxdb influxdb 4096 Dec 14 02:06 ..
drwxrwx--- 4 influxdb influxdb 4096 Dec 14 02:06 _internal
drwxrwx--- 4 influxdb influxdb 4096 Dec 14 02:06 telegraf

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

As you see "collectd" is not working fine. Check the "/var/log/syslog" for errors.
Run "tail -f /var/log/syslog" and restart the collectd daemon

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

This is the output

grafik

after the restart I get

grafik

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

Take a look at the end of the conf file: /etc/collectd/collectd.conf
Is there the following entry:

<Include "/etc/collectd/collectd.conf.d">
        Filter "*.conf"
</Include>

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

Yes, it is included in the file

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

Mhh.. Very tricky..
Check whether the file exists:
ls -la /usr/share/collectd/types.db

Open this file:
vi /etc/influxdb/influxdb.conf

Search for the section "collectd"

[[collectd]]
enabled = true
bind-address = "127.0.0.1:25826"
database = "collectd"
typesdb = "/usr/share/collectd/types.db"

This is important. Otherwise the InfluxDB will not exist.
Now check this:
pip list
The following packages must installed

fritzcollectd       0.7.0
fritzconnection     0.8.5

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

Everything exists and is exactly configured as you described

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

That‘s very strange. Restart influxdb.
Maybe one thing can be a problem. The password for the FritzBox user. The char „@„ in double quote can be a problem. Use please another char like „!“.
Please show me the permissions of the user of that you added.
And try to login through the FritzBox with the credentials.

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

I changed the password, still not working - I have no problem logging in with the user

grafik

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

I just deleted the dashboard and tried adding it again, now it says
InfluxDB Error: database not found: collectd

Edit: I see there are 2 guys with the same error in issue #1
I have not upgraded the debian packages, as far as I know - however, I have watchtower running, maybe it upgraded something?

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

Ich sehe gerade das Du deutsch sprichst.. :)
Der Fehler den Du jetzt hast ist klar. Der kommt davon weil InfluxDB keine Datenbank von CollectD hat.
Deswegen fragte ich nach der Ausgabe:
ls -la /var/lib/influxdb/data/
Das bedeuted. Das CollectD nicht auf Deine FritzBox zugreift und keine Daten liefert. Und das verstehe ich gereade nicht.
Unter
/etc/grafana/provisioning/datasources
muss eine Datei liegen:
influxDB-FritzBox.yaml
Diese ist für Grafana um die richtige Datasource einzubinden.

Zeige mir bitte mal von Docker den Inhalt von "Volumes".

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

Ja, ich spreche deutsch, but let's keep it in English in case somebody gets the same error - so they can use this as a guide :)

/etc/grafana/provisioning/datasources
muss eine Datei liegen:
influxDB-FritzBox.yaml

yes, this file exists

grafik

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

Ok.. I will shutdown my instance and install the image again.

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

I'd deleted my container and did a fresh installation of the image from Docker Hub.
I can't reproduce the problem. Everything is working fine.
But for me now. You install this image: https://hub.docker.com/r/space2place/synology-fritzbox-grafana
And not: https://hub.docker.com/r/alhazmy13/telegraf-influxdb-grafana

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

I nuked the image and the container, redownloaded and it still does not work
I don't know if I did something wrong
I get this log in portainer when I start the container for the first time

/usr/lib/python3/dist-packages/supervisor/options.py:474: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.

self.warnings.warn(

2022-01-11 17:48:14,328 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.

2022-01-11 17:48:14,328 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing

2022-01-11 17:48:14,366 INFO RPC interface 'supervisor' initialized

2022-01-11 17:48:14,367 CRIT Server 'unix_http_server' running without any HTTP authentication checking

2022-01-11 17:48:14,367 INFO supervisord started with pid 14

2022-01-11 17:48:15,369 INFO spawned: 'sshd' with pid 15

2022-01-11 17:48:15,372 INFO spawned: 'influxdb' with pid 16

2022-01-11 17:48:15,373 INFO spawned: 'syslog' with pid 17

2022-01-11 17:48:15,375 INFO spawned: 'telegraf' with pid 18

2022-01-11 17:48:15,377 INFO spawned: 'collectd' with pid 19

2022-01-11 17:48:15,379 INFO spawned: 'grafana' with pid 20

2022-01-11 17:48:15,387 INFO spawned: 'chronograf' with pid 21

2022-01-11 17:48:15,390 INFO spawned: 'snmpwalk' with pid 22

2022-01-11 17:48:15,796 INFO exited: telegraf (exit status 0; not expected)

2022-01-11 17:48:16,166 INFO exited: collectd (exit status 0; not expected)

2022-01-11 17:48:16,386 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

2022-01-11 17:48:16,387 INFO success: influxdb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

2022-01-11 17:48:16,387 INFO success: syslog entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

2022-01-11 17:48:16,387 INFO success: grafana entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

2022-01-11 17:48:16,387 INFO success: chronograf entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

collectd[79]: plugin_load: plugin "syslog" successfully loaded.

collectd[79]: plugin_load: plugin "battery" successfully loaded.

collectd[79]: plugin_load: plugin "cpu" successfully loaded.

collectd[79]: plugin_load: plugin "df" successfully loaded.

collectd[79]: plugin_load: plugin "disk" successfully loaded.

collectd[79]: plugin_load: plugin "entropy" successfully loaded.

collectd[79]: plugin_load: plugin "interface" successfully loaded.

collectd[79]: plugin_load: plugin "irq" successfully loaded.

collectd[79]: plugin_load: plugin "load" successfully loaded.

collectd[79]: plugin_load: plugin "memory" successfully loaded.

collectd[79]: plugin_load: plugin "processes" successfully loaded.

2022-01-11 17:48:16,983 INFO spawned: 'telegraf' with pid 87

2022-01-11 17:48:16,984 INFO success: snmpwalk entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

2022-01-11 17:48:17,460 INFO spawned: 'collectd' with pid 111

2022-01-11 17:48:17,461 INFO exited: grafana (exit status 0; expected)

2022-01-11 17:48:17,645 INFO exited: collectd (exit status 0; not expected)

2022-01-11 17:48:17,660 INFO exited: telegraf (exit status 0; not expected)

collectd[79]: plugin_load: plugin "rrdtool" successfully loaded.

collectd[79]: plugin_load: plugin "swap" successfully loaded.

collectd[79]: plugin_load: plugin "users" successfully loaded.

collectd[79]: utils_taskstats: CTRL_CMD_GETFAMILY("TASKSTATS"): No such file or directory

collectd[79]: utils_taskstats: get_family_id() = No such file or directory

collectd[79]: processes plugin: Creating taskstats handle failed.

collectd[79]: Initialization complete, entering read-loop.

collectd[79]: battery plugin: All available input methods failed.

collectd[79]: read-function of plugin `battery' failed. Will suspend it for 20.000 seconds.

2022-01-11 17:48:17,997 INFO exited: influxdb (exit status 0; expected)

2022-01-11 17:48:19,656 INFO spawned: 'collectd' with pid 128

2022-01-11 17:48:19,669 INFO spawned: 'telegraf' with pid 129

2022-01-11 17:48:19,758 INFO exited: collectd (exit status 0; not expected)

2022-01-11 17:48:19,833 INFO exited: telegraf (exit status 0; not expected)

2022-01-11 17:48:21,581 INFO exited: syslog (exit status 0; expected)

2022-01-11 17:48:21,581 INFO exited: snmpwalk (exit status 0; expected)

2022-01-11 17:48:23,584 INFO spawned: 'telegraf' with pid 148

2022-01-11 17:48:23,586 INFO spawned: 'collectd' with pid 149

2022-01-11 17:48:23,618 INFO exited: collectd (exit status 0; not expected)

2022-01-11 17:48:23,630 INFO gave up: collectd entered FATAL state, too many start retries too quickly

2022-01-11 17:48:23,630 INFO exited: telegraf (exit status 0; not expected)

2022-01-11 17:48:23,631 INFO gave up: telegraf entered FATAL state, too many start retries too quickly

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

The problem with telegraf will be fixed.
For now. Login to the container. Then do:

mkdir -p /etc/telegraf/.cache
chown telegraf:telegraf /etc/telegraf/.cache

Now kill an existing instance of telegraf
ps -ef | grep telegraf
Note the PID
kill -9 PID
Now you can start telegraf
/etc/init.d/telegraf start
and check it
/etc/init.d/telegraf status

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

Alright, thanks
Could this be the reason why it's not working?

2022-01-11 18:42:53,115 INFO gave up: collectd entered FATAL state, too many start retries too quickly

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

Do the same with collectd
ps -ef | grep collectd
Note the PID
kill -9 PID
Now you can start collectd
/etc/init.d/collectd start
and check it
/etc/init.d/collectd status

I'm not sure whether it is an issue to the missing collectd db. I'd the same error with telegraf in my log. But my instance is working.

I will try to fix the issue with telegraf and update the docker conatiner

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

Alright, thanks
I don't know why my collectd db is missing, I did everything according to the instructions

from synology-fritzbox-grafana.

Camelot631 avatar Camelot631 commented on July 4, 2024

Hi Sascha... thanks for your message. Since I was absent, I missed something. I'll read along ... the installation doesn't work that way for me ... maybe someone has another idea ...

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

One question. Do you have DSL or Fibre over LAN1?

Edit:
I‘d found some important informations for the FritzBox and fritzcollectd

In order to be able to read the status information the option "Transmit status information over UPnP" has to be enabled in the "Network Settings" menu on the Fritz!BOX.
For reading values that are marked with requires authentication in the introduction section, the option "Allow access for applications" (also in "Network Settings") has to be enabled as well. If desired a separate user account can be created for gathering statistics in "FRITZ!Box Users" in the "System" menu. The account needs to have the "FRITZ!Box Settings" permission.

Please check this in the FritzBox

from synology-fritzbox-grafana.

dfoerster79 avatar dfoerster79 commented on July 4, 2024

i checked my installation and have the same outputs like lexxior.
but i read in this instruction, the docker-collectd-fritzbox will only works till fritzos 7.28:
https://github.com/rudelm/docker-collectd-fritzbox
Screenshot 2022-01-11 210636

my fritzbox use 7.29... is this the problem?

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

No- i‘ve 7.29 too. This is not the problem. Did you check what i‘ve quoted in my last comment?

from synology-fritzbox-grafana.

dfoerster79 avatar dfoerster79 commented on July 4, 2024

One question. Do you have DSL or Fibre over LAN1?

Edit: I‘d found some important informations for the FritzBox and fritzcollectd

In order to be able to read the status information the option "Transmit status information over UPnP" has to be enabled in the "Network Settings" menu on the Fritz!BOX.
For reading values that are marked with requires authentication in the introduction section, the option "Allow access for applications" (also in "Network Settings") has to be enabled as well. If desired a separate user account can be created for gathering statistics in "FRITZ!Box Users" in the "System" menu. The account needs to have the "FRITZ!Box Settings" permission.

Please check this in the FritzBox

i think it's allready ok
fritz1
fritz2

from synology-fritzbox-grafana.

dfoerster79 avatar dfoerster79 commented on July 4, 2024

i have dsl

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

I'd created a new docker image with some new packages.

  • TELEGRAF => 1.21.2-1
  • INFLUXDB => 1.8.10
  • CHRONOGRAF => 1.9.1

The problem with telegraf is fixed too.
The message

INFO gave up: telegraf entered FATAL state, too many start retries too quickly

can be ignored. Telegraf is running.
I'd installed the new image on my DS218+ with the latest version, and everything works.

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

I downloaded the image, created a new container and it still does not work - still can't find collectd database

from synology-fritzbox-grafana.

Camelot631 avatar Camelot631 commented on July 4, 2024

The same problem by me....

DS220+ and DS420+, Newest DSM-Version

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

if someone will contact me ([email protected]) we can make a session over Teamviewer. Otherwise i'm not able to find the issue.

from synology-fritzbox-grafana.

dfoerster79 avatar dfoerster79 commented on July 4, 2024

same Problem...

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

Hello together.. Now I just tested everything with @dfoerster79. We have found the error.
In the file "fritzcollectd.conf" had dfoerster79 at "Hostname" the entry:
Fritz.Box
Note the ".". This did not let "collectd" work properly. I can't say why, because I don't know exactly how "collectd" handles it.
After the change to "FritzBox" (as it is given in the template), "collectd" delivered its data to InfluxDB.

Thanks again @dfoerster79 for the time you took to test this together with me.

Edit...
Possibly a firewall (Synology Firewall) blocks as well.
Log into the container and try to open port 49000 of your FritzBox with Telnet:
telnet "IP address of the FritzBox" 49000

Telnet must be installed in the container before:
apt update && apt install telnet

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

The file is correctly configured for me, tried the port and checked my Firewall where everything should be configured correctly
yet the issue persists

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

@Lexxior is ist possible to make a teamviever session? If yes send me an email. We will find a date. Remember i‘m in the timezone UTC +1

from synology-fritzbox-grafana.

Lexxior avatar Lexxior commented on July 4, 2024

I sent you a mail

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

@Lexxior thank you for the nice conversation.
We were able to fix the error. It was due to the Influx database. It seems that the daemon started in a state that CollectD could not deliver any data.
To fix the problem you have to log into the container:
ps -ef | grep influx
execute. Then stop the PID of the running process:
kill -9 PID
Then restart the database:
/etc/init.d/influxdb start
Now the command:
/etc/init.d/influxdb status
should give a positive output.
@dfoerster79 I think that was also the problem with you. Not the point of "Fritz.Box".

@Camelot631
Please try this on your installation. I think it's the same problem

from synology-fritzbox-grafana.

robokats avatar robokats commented on July 4, 2024

I have the exact same issue. I carefully read through this entire thread but did not find any suggestion that helps.

From the grafana interface I did a database test and got "InfluxDB Error: database not found: collectd".

Stopping and starting influxdb doesn't change anything.

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

Check in the conatiner wheter collectd is running. Find the process id and kill the id. Then start collectd

from synology-fritzbox-grafana.

robokats avatar robokats commented on July 4, 2024

I've killed collectd many times, it relaunches automatically. And it doesn't change a thing.

from synology-fritzbox-grafana.

TheCry avatar TheCry commented on July 4, 2024

Since upgrading the firmware to 7.56 i have the same problem. I have to check this

from synology-fritzbox-grafana.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.