Once again: THANKS FOR YOUR TIME AND HELP!
This issue can be marked as fixed/resolved.
Once again: THANKS FOR YOUR TIME AND HELP!
This issue can be marked as fixed/resolved.
OK, at some time you have tried to customize the environment variable OMV_COLLECTD_HOSTNAME because uname -n outputs the hostname. Please execute omv-env get | grep HOSTNAME and something like OMV_COLLECTD_HOSTNAME=`uname -n` should be displayed.
Please run omv-env unset OMV_COLLECTD_HOSTNAME and omv-salt stage run prepare; omv-salt deploy run collectd to fix the issue.
I post my previous message because I haven't seen you post (timing). Now collectd.conf file looks much better after running commands you proposed and I can see that statistics are collected. Thanks for your help!
Questions:
1. Do I have to recover content of /etc/salt/minion_id to previous value?
2. Correct me if I'm wrong: omv-env unset OMV_COLLECTD_HOSTNAME removed OMV_COLLECTD_HOSTNAME from /etc/default/openmediavault permanently and It will persist between restarts.
I found this in /etc/default folder:
root@openmediavault:/etc/default# ls -la
razem 212
drwxr-xr-x 3 root root 4096 sty 14 11:32 .
drwxrwxr-x 113 root root 12288 sty 14 11:32 ..
<snip>
-rw-r--r-- 1 root root 2704 gru 18 2020 openmediavault
-rw-r--r-- 1 root root 1831 lis 17 2020 openmediavault.dpkg-dist
<snip>
root@openmediavault:/etc/default# diff openmediavault openmediavault.dpkg-dist
1,20d0
< # This file is part of OpenMediaVault.
< #
< # @license http://www.gnu.org/licenses/gpl.html GPL Version 3
< # @author Volker Theile <volker.theile@openmediavault.org>
< # @copyright Copyright (c) 2009-2018 Volker Theile
< #
< # OpenMediaVault is free software: you can redistribute it and/or modify
< # it under the terms of the GNU General Public License as published by
< # the Free Software Foundation, either version 3 of the License, or
< # any later version.
< #
< # OpenMediaVault is distributed in the hope that it will be useful,
< # but WITHOUT ANY WARRANTY; without even the implied warranty of
< # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
< # GNU General Public License for more details.
< #
< # You should have received a copy of the GNU General Public License
< # along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>.
<
< # Default values
27a8,9
> OMV_SHAREDFOLDERS_DIR="/sharedfolders"
> OMV_SHAREDFOLDERS_DIR_ENABLED="NO"
39c21
< OMV_MKCONF_SCRIPTS_DIR="/usr/share/openmediavault/mkconf"
---
> OMV_SALT_SCRIPTS_DEPLOY_DIR="/srv/salt/omv/deploy"
46,47c28,29
< OMV_INITSYSTEM_SCRIPTS_DIR="/usr/share/openmediavault/initsystem"
< OMV_INITSYSTEM_FILE="/var/lib/openmediavault/initsystem.req"
---
> OMV_INITDB_SCRIPTS_DIR="/usr/share/openmediavault/initsystem"
> OMV_INITDB_FILE="/var/lib/openmediavault/initsystem.req"
50a33,34
> OMV_WEBGUI_ADMINUSER_NAME="admin"
> OMV_WEBGUI_ADMINGROUP_NAME="openmediavault-admin"
56,59d39
< OMV_COLLECTD_HOSTNAME=`uname -n`
< OMV_SHAREDFOLDERS_DIR="/sharedfolders"
< OMV_WEBGUI_ADMINUSER_NAME="admin"
< OMV_WEBGUI_ADMINGROUP_NAME="openmediavault-admin"
Alles anzeigen
So it looks like an update change the default settings. Removing OMV_COLLECTD_HOSTNAME=`uname -n` from the file DOES NOT change the situation. After reboot and run omv-salt deploy run collectd rrdcached there is still strange entry in /etc/collectd/collectd.conf and the "uname -n" catalog name.
ps.
I found that old domain name was stored in /etc/salt/minion_id - after changing it omv-salt command shows correct FQDN of my OMV installation.
Nope it does not change the content of /etc/collectd/collectd.conf file (see attachment).
What I can tell, it is strange that it shows information for openmediavault.lipowa54.local hostname - it should be openmediavault.lipowa54.home (I have changed my local domain long time ago, and I do change hostname on OMV side too):
❯ cat /etc/hosts
# This file is auto-generated by openmediavault (https://www.openmediavault.org)
# WARNING: Do not edit this file, your changes will get lost.
127.0.0.1 localhost.localdomain localhost
127.0.1.1 openmediavault.lipowa54.home openmediavault
Maybe this is a problem?
There is also one more file etc-collectd_collectd.conf.j2 located in /var/cache, but it also looks pretty good:
❯ sudo cat /var/cache/salt/minion/files/base/omv/deploy/collectd/files/etc-collectd_collectd.conf.j2
{% set pid_file = salt['pillar.get']('default:OMV_COLLECTD_PIDFILE', '/run/collectd.pid') -%}
{% set hostname = salt['pillar.get']('default:OMV_COLLECTD_HOSTNAME', 'localhost') -%}
{% set fqdn_lookup = salt['pillar.get']('default:OMV_COLLECTD_FQDNLOOKUP', 'true') -%}
PIDFile "{{ pid_file }}"
Hostname "{{ hostname }}"
FQDNLookup {{ fqdn_lookup }}
<Include "/etc/collectd/collectd.conf.d">
Filter "*.conf"
</Include>
Alles anzeigen
Well, it is quite old installation (I've started from OMV 3.x as I remember) but I can't remember that I have done any customization - but I cannot be 100% sure.
My template Jinja file looks pretty the same as the one you linked:
❯ cat /srv/salt/omv/deploy/collectd/files/etc-collectd_collectd.conf.j2
{% set pid_file = salt['pillar.get']('default:OMV_COLLECTD_PIDFILE', '/run/collectd.pid') -%}
{% set hostname = salt['pillar.get']('default:OMV_COLLECTD_HOSTNAME', 'localhost') -%}
{% set fqdn_lookup = salt['pillar.get']('default:OMV_COLLECTD_FQDNLOOKUP', 'true') -%}
PIDFile "{{ pid_file }}"
Hostname "{{ hostname }}"
FQDNLookup {{ fqdn_lookup }}
<Include "/etc/collectd/collectd.conf.d">
Filter "*.conf"
</Include>
Alles anzeigen
so the uname -n has to be originated from other place (???).
To emphasize: the folder name created in /var/lib/rrdcached/db is the command itself "uname -n" NOT the result of this command.
It is.
I can see *.rrd files are updated every 10 or 15 minutes in `uname -n` folder.
Hi there!
I'm running OMV 5.6.23-1. I cannot see any statistics build/generated by rrdcached/collectd.
The problem is (I think) collectd configuration:
root@openmediavault:/var/lib/rrdcached/db# ls -la
razem 12
drwxr-xr-x 3 root root 4096 sty 15 14:25 .
drwxr-xr-x 4 root root 4096 sty 15 14:24 ..
drwxr-xr-x 14 root root 4096 sty 14 11:44 '`uname -n`' <-- THIS IS A PROBLEM
root@openmediavault:/var/lib/rrdcached/db# cat /etc/collectd/collectd.conf
PIDFile "/run/collectd.pid"
Hostname "`uname -n`" <-- THIS IS A PROBLEM
FQDNLookup true
<Include "/etc/collectd/collectd.conf.d">
Filter "*.conf"
</Include>
Alles anzeigen
Is there a place where it can be changed (every "apply changes" will overwrite changes made to collectd.conf file) "globally"?