Code Monkey home page Code Monkey logo

qnap-collectdinfluxdbgrafana's People

Contributors

zottelbeyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

qnap-collectdinfluxdbgrafana's Issues

The stack is not autostarting between reboots

Hello and Thank you for this.
I have a TS-1635AX.
I followed your instructions and all was all working.
I then restarted the NAS.
Nothing came back, I looked at the container station there was an entry for qnap-collectdinfluxdbgrafana-master that wouldn't start up.
Error message:
Failed to start application.: Application not found:
qnap-collectdinfluxdbgrafana-master

The only way I could get is started was to SSH in the NAS and run docker-compose up -d from the QNAP-collectdinfluxdbgrafana-master directory.

Can you offer any suggestions to get this to autostart on reboots?
Thanks

Use external influxdb, run qnap-collectd from server

hi,
i see you docker-compose file and i create my compose-file from ubuntu server.
Pull correctly the container, but one question about configuration file.I see the

Server "127.0.0.1" "25826"

how possible to change the output file to sent data direclty to influxDB?
Thanks
Mattia

How do I find my device names

Hi,

on the Grafana-dashboard from the repo my DISK Usage is "N/A".
The imported dashboard from grafana.com it shows Storage "No Data" and DISK Usage "N/A".

I see that in the collectd config I have to adjust my Devices. But the one from my df -h command will not change anything.
SELECT * FROM "df_value" WHERE ("host" =~ /^QNAP-collectd$/) is empty

How can I resolve this issue? What info can I provide?

Thank You.

Peter

Changed docker compose to use ip addresses and it broke something

I use docker-compose with macvlan as opposed to host IP with ports. A install using your docker file worked just fine. I modified it to use macvlan and now it is now longer working. collectd produces the following error:


[2022-08-31 16:30:58] [notice] read-function of plugin `snmp-QNAP-collectd' failed. Will suspend it for 60.000 seconds.

If I change collectd to use hostmode again, I no longer get the errors, but the dashboard no longer updates. Perhaps because influx and grafana are still using external IPs.

Here is my current docker-compose:


version: '3'

services:

  collectd:
    container_name: qnap-collectd
    image: ghcr.io/zottelbeyer/qnap-collectd-ghcr:latest
    privileged: true
    hostname: qnap-collectd
    networks:
      mylan:
        ipv4_address: 10.0.100.120
#    network_mode: host
    volumes:
      - /:/rootfs/:ro
      - ./qnap-collectd/collectd.conf.d:/etc/collectd/collectd.conf.d/:ro
    restart: always

  influxdb:
    container_name: qnap-influxdb
    image: influxdb:1.8
    hostname: qnap-influxdb
    networks:
      mylan:
        ipv4_address: 10.0.100.121
    environment:
      INFLUXDB_USER: ${INFLUXDB_USERNAME}
      INFLUXDB_USER_PASSWORD: ${INFLUXDB_PASSWORD}
      INFLUXDB_DB: ${INFLUXDB_DATABASE}
    volumes:
      - ./influxdb/influxdb.conf:/etc/influxdb/influxdb.conf
      - ./influxdb/types.db:/usr/share/collectd/types.db
      - ./influxdb-data:/var/lib/influxdb
    restart: always

  grafana:
    container_name: qnap-grafana
    image: grafana/grafana:latest
    hostname: qnap-grafana
    user: "root"
    networks:
      mylan:
        ipv4_address: 10.0.100.122
    environment:
      GF_SECURITY_ADMIN_USER: ${GF_SECURITY_ADMIN_USER}
      GF_SECURITY_ADMIN_PASSWORD: ${GF_SECURITY_ADMIN_PASSWORD}
    volumes:
      - ./grafana/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
      - ./grafana/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
      - ./grafana/QNAP-collectd.json:/var/lib/grafana/dashboards/QNAP-collectd.json
      - ./grafana-data:/var/lib/grafana
    restart: always

networks:
    mylan:
      external: true

Here are the settings from my qnap:

image

Any ideas on how I could get this to work using macvlan as opposed to host/bridge networking? Thanks in advance for any pointers.

[error] disk plugin: fopen (/proc/{diskstats,partitions}) failed

Hello,

I want to integrate the container on a QNAP-NAS (TS451), but I get the following errors when starting:

[2020-08-06 09:28:12] [error] cf_util_get_string: The Address option requires exactly one string argument.                                                                                                                                  
[2020-08-06 09:28:12] [info] Initialization complete, entering read-loop.                                                                                                                                                                   
[2020-08-06 09:28:12] [error] disk plugin: fopen (/proc/{diskstats,partitions}) failed.                                                                                                                                                     
[2020-08-06 09:28:12] [notice] read-function of plugin `disk' failed. Will suspend it for 20.000 seconds.                                                                                                                                   
[2020-08-06 09:28:12] [warning] interface plugin: fopen: No such file or directory                                                                                                                                                          
[2020-08-06 09:28:12] [error] cpu plugin: fopen (/proc/stat) failed: No such file or directory                                                                                                                                              
[2020-08-06 09:28:12] [notice] read-function of plugin `cpu' failed. Will suspend it for 20.000 seconds.                                                                                                                                    
[2020-08-06 09:28:12] [warning] memory: fopen: No such file or directory                                                                                                                                                                    
[2020-08-06 09:28:12] [notice] read-function of plugin `memory' failed. Will suspend it for 20.000 seconds.                                                                                                                                 
[2020-08-06 09:28:12] [warning] swap plugin: fopen (/proc/meminfo) failed: No such file or directory                                                                                                                                        
[2020-08-06 09:28:12] [warning] swap: fopen: No such file or directory                                                                                                                                                                      
[2020-08-06 09:28:12] [error] Cannot open `/proc': No such file or directory                                                                                                                                                                
[2020-08-06 09:28:12] [notice] read-function of plugin `processes' failed. Will suspend it for 20.000 seconds.                                                                                                                              
[2020-08-06 09:28:12] [notice] read-function of plugin `interface' failed. Will suspend it for 20.000 seconds.                                                                                                                              
[2020-08-06 09:28:22] [warning] swap plugin: fopen (/proc/meminfo) failed: No such file or directory                                                                                                                                        
[2020-08-06 09:28:22] [warning] swap: fopen: No such file or directory                                                                                                                                                                    

I tried it out via SSH and the Container-Station app. Somehow the container does not have access to the host, because these calls work in SSH. It was tried in both versions (privileged).

Trouble getting up and running.

I'm struggling to get this up and running. The final test you suggest (grafana datasources) is returning the error:
"Network Error: Bad Gateway(502)"
The other tests appear to work.

What setup should I have for my snmp on the qnap config?
Port Number : 8086?
Trap addresses : 127.0.0.1?
SNMP Version : v1/2
Community?

Any ideas where else I might have broken something? :)
Thanks for sharing this, very interesting!

Transfert data to external influxDB

Hello guys,
I have a question.
I would like to send data collected by collectd in another influx DB (OMD-lab).
Is there a way to connect the network created in the dockers to my network and sending data to external influx DB?
I've changed:

Server "127.0.0.1" "25826"

in

Server "my server" "25826"

but network configured in the dockers (172.29.0.1) can't comunicate to my network (192.168.1.X).

Looking forward to your reply.
Regards.
Giacomo.

Not a Issue, but a question about docker container monitoring

I was looking to monitor my qnap as it was running out of memory every few days and the container station get stopped, i have unifi controller software running as a container and that get stopped.

qnap log was not really helpful in finding why i am running out of memory (16gb btw)

ended up setting this grafana and got it to work (with default user/password, i am unable to create new users though)

question is would it be possible to add all docker container to the grafana to monitor so i can see if any of the container is causing a spike in memory.
thanks for the great program.

[error] read-function of plugin 'snmp-QNAP-collectd' failed

First of all thanks a lot for this good repo. It's verry well explained!

Problem

I have an error with qnap-collectd with the snmp.
[2020-07-27 20:40:04] [error] snmp plugin: host QNAP-collectd: snmp_sess_synch_response failed: Timeout [2020-07-27 20:40:04] [notice] read-function of plugin 'snmp-QNAP-collectd' failed. Will suspend it for 60.000 seconds. [2020-07-27 20:41:04] [error] snmp plugin: host QNAP-collectd: snmp_sess_synch_response failed: Timeout [2020-07-27 20:41:04] [notice] read-function of plugin'snmp-QNAP-collectd' failed. Will suspend it for 120.000 seconds.

Of my knowledge, the snmp services were not activated before the installation. Here's the settings:

2020-07-27 17_03_06-QNAPHTPC

Impact
This error caused the plugin to stop. Therefore I had no statistics sync.

Temporary fix

To solve this problem I have edited the qnap-collectd/collectd.conf.d/sample.conf and removed the LoadPlugin snmp.
Now I have some information but not all (No temperature, No fans data) probably caused by the snmp.

No Temp/Fan values available

Hi,

Thanks for your project. I installed it on my QNAP NASF7A7F4 with v4.5.1. As I can see all values are showing in Grafana except Temp and FAN.

In the qnap-collectd log is listed this error message:

[2020-11-23 12:10:00] [error] snmp plugin: host QNAP-collectd: snmp_sess_synch_response failed: Timeout


[2020-11-23 12:10:00] [notice] read-function of plugin `snmp-QNAP-collectd' failed. Will suspend it for 60.000 seconds.```

Dashboard: Is memory consumption value correct?

Thanks for providing this bundle. Great work, ran out of the box!
Memory

After having a closer look at the numbers I am a little bit curious about the memory consumption value, because the number does not match the value QNAP shows in the resource monitor:

Any idea?

environment variable are taking effect

in docker-compose yml
i made changes to environment variables by setting username and password, it does not work, it still accepts the username as "user" and password as "password" only.

I also put few other environment variables to disable_sanitize_html, anonymous login and so, and nothing seem to take effect.

what am I doing wrong?

InfluxDB auf anderen server

Hallo, sorry ich spreche leider kein englisch.
Da ich bereits eine InfluxDB und eine Grafana auf einem Proxmox Server zu laufen habe, würde ich gerne diese weiter verwenden. welche Einstellungen muss ich ändern um die Daten an den Proxmox zu leiten. Danke

Problem with http://192.168.1.47:3001/datasources/edit/1/

Hi,
I ran the installation but the problem was:
Error response from daemon: driver failed programming external connectivity on endpoint grafana (f387da3e1e214d2af84007c331d3771eedea6f06627d07d5da0074b5c934c4d5): listen tcp4 0.0.0.0:3000: bind: address already in use
I changed the docker-compose.yml
with graphana:
container_name: grafana
image: grafana/grafana:latest
user: "root"
environment:
GF_SECURITY_ADMIN_USER: ${GF_SECURITY_ADMIN_USER}
GF_SECURITY_ADMIN_PASSWORD: ${GF_SECURITY_ADMIN_PASSWORD}
ports:
- "3001:3001"

But the problem is that I can't see it
http://192.168.1.47:3001/datasources/edit/1/
everything else seems to work fine.
I have a qnap with container station installed

Disks seem incorrect for my model QNAP

First off, great job with getting this setup and working. I'm new to docker/influx/graphana/collectd, so go easy on me.

Install instructions were spot on and easy to follow, so no problems getting that completed.
I have a QNAP TVS-1282.
8 HDD, 2 M2, 4 SSD slots.
On my dashboard HDD3 - HDD6 do not show any temperature (screenshot at bottom), so I assume these 4 readings are actually the 4 SSD slots that are empty on my system.
How can I go about correcting these?

Also, the RAM on the graphana dashboard always shows 99%. On my QNAP dashboard, it averages around 12%.

QNAP TVS-1282 CPU/Ram Dashboard
Screen Shot 2020-07-08 at 3 36 51 PM

QNAP TVS-1282 Disks:
Screen Shot 2020-07-08 at 3 11 29 PM

Graphana Dashboard:
Screen Shot 2020-07-08 at 3 31 34 PM

Thank you!

QTS 4.5.1 changes SNMP MIB

This will take some time to debug. See QNAP Release Notes for 4.5.1

QTS now supports new SNMP OIDs (Object Identifiers) and MIBs (Management Information Bases).

QNAP has updated their SNMP MIB and it seems the new QTS-MIB introduces some Problems with the existing sample collectd config:

[2020-10-17 06:00:08] [warning] snmp plugin: I don't know the ASN type #128 (OID: "NAS-MIB::readHitRate.0", data block "qnap_cache_read_hitrate", host block "QNAP-collectd")
[2020-10-17 06:00:08] [warning] snmp plugin: I don't know the ASN type #128 (OID: "NAS-MIB::writeHitRate.0", data block "qnap_cache_write_hitrate", host block "QNAP-collectd")
[2020-10-17 06:00:18] [warning] snmp plugin: I don't know the ASN type #128 (OID: "NAS-MIB::enclosureSystemTemp.1", data block "qnap_enclosure_temp", host block "QNAP-collectd")
[2020-10-17 06:00:18] [warning] snmp plugin: I don't know the ASN type #129 (OID: "NAS-MIB::cpu-TemperatureEX", data block "qnap_cpu_temp", host block "QNAP-collectd")

Impact:

  • CPU, Enclosure and System Temperatures are missing
  • Fan Speed is missing
  • Cache Hit Rate is missing

Drive Temperatures still appear to be working.

When trying to use the new QTS-MIB as provided in QTS 4.51 I'm hit with syntax errors:

[2020-10-17 05:48:34] [info] plugin_load: plugin "snmp" successfully loaded.
Unlinked OID in QTS-MIB: eventErrorMsg ::= { systemEventMsg 103 }
Undefined identifier: systemEventMsg near line 33 of /usr/share/snmp/mibs/QTS-MIB.txt
Unlinked OID in QTS-MIB: eventWarningMsg ::= { systemEventMsg 102 }
Undefined identifier: systemEventMsg near line 26 of /usr/share/snmp/mibs/QTS-MIB.txt
Unlinked OID in QTS-MIB: eventInformMsg ::= { systemEventMsg 101 }
Undefined identifier: systemEventMsg near line 19 of /usr/share/snmp/mibs/QTS-MIB.txt
SYNTAX (is a reserved word): At line 2094 in /usr/share/snmp/mibs/QTS-MIB.txt
MAX-ACCESS (is a reserved word): At line 2095 in /usr/share/snmp/mibs/QTS-MIB.txt
STATUS (is a reserved word): At line 2096 in /usr/share/snmp/mibs/QTS-MIB.txt
DESCRIPTION (is a reserved word): At line 2099 in /usr/share/snmp/mibs/QTS-MIB.txt
: (is a reserved word): At line 2100 in /usr/share/snmp/mibs/QTS-MIB.txt
Bad operator (1): At line 2100 in /usr/share/snmp/mibs/QTS-MIB.txt
[2020-10-17 05:48:34] [error] snmp plugin: snmp_parse_oid (QTS-MIB::cpu-TemperatureEX.0) failed.
[2020-10-17 05:48:34] [error] snmp plugin: snmp_parse_oid (QTS-MIB::systemTemperatureEX.0) failed.
[2020-10-17 05:48:34] [error] snmp plugin: snmp_parse_oid (QTS-MIB::enclosureSystemTemp.1) failed.
[2020-10-17 05:48:34] [error] snmp plugin: read_objid (QTS-MIB::hdIndex) failed.
[2020-10-17 05:48:34] [error] snmp plugin: read_objid (QTS-MIB::systemFanIndex) failed.
[2020-10-17 05:48:34] [error] snmp plugin: snmp_parse_oid (QTS-MIB::readHitRate.0) failed.
[2020-10-17 05:48:34] [error] snmp plugin: snmp_parse_oid (QTS-MIB::writeHitRate.0) failed.

Not sure when I'll get around to fixing it but I will need testers running QTS 4.4 to ensure backwards compatibility.

collectd config not working properly on collectd 5.9.0

Hello,

I was migrating config to new server. On old one I have collectd v 5.7.2 while on new one it's 5.9.0. Not all data is pooled, and some of the pooled is inproper (uptime for example) I think it's a matter of collectd config.

Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "network" successfully loaded.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "disk" successfully loaded.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "df" successfully loaded.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "interface" successfully loaded.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "users" successfully loaded.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "cpu" successfully loaded.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "load" successfully loaded.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "memory" successfully loaded.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "swap" successfully loaded.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "uptime" successfully loaded.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "processes" successfully loaded.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "exec" successfully loaded.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: plugin_load: plugin "snmp" successfully loaded.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_cpu_temp: Option Instance' is deprecated, please use option TypeInstance'.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_system_temp: Option Instance' is deprecated, please use option TypeInstance'.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_hdd_temp: Option InstancePrefix' is deprecated, please use option TypeInstancePrefix'.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_hdd_temp: Option Instance' is deprecated, please use option TypeInstanceOID'.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_fan_rpm: Option InstancePrefix' is deprecated, please use option TypeInstancePrefix'.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_fan_rpm: Option Instance' is deprecated, please use option TypeInstanceOID'.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_cache_read_hitrate: Option Instance' is deprecated, please use option TypeInstance'.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: snmp plugin: data qnap_cache_write_hitrate: Option Instance' is deprecated, please use option TypeInstance'.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: Systemd detected, trying to signal readiness.
Nov 2 13:20:45 ubuntu-serv systemd[1]: Started Statistics collection and monitoring daemon.
Nov 2 13:20:45 ubuntu-serv collectd[5510]: Initialization complete, entering read-loop.

image

image

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.