it-novum / openITCOCKPIT

openITCOCKPIT is an Open Source system monitoring tool built for different monitoring engines like Nagios, Naemon and Prometheus.
https://openitcockpit.io/
GNU General Public License v3.0
271 stars 50 forks source link

Administration > refresh monitoring configuration dose nothing #919

Closed jharl closed 5 years ago

jharl commented 5 years ago

Hi I have a new install byway of apt-get with neamon back-end. I am trying to add my first host and service . when I click refresh monitoring configuration in the upper right corner a new screen come up with a green button that states refresh configuration I click it and the screen changes but there are no results as per the documentation. thanks

Jharl

image

m4ximum commented 5 years ago

Hi Jharl, can you take a look at the debugging page and check the process information and also the Queuing Engine? It seems like there are some processes not running on your system

bildschirmfoto 2019-02-19 um 07 47 44 bildschirmfoto 2019-02-19 um 07 47 33

nook24 commented 5 years ago

@jharl Restarting the openITCOCKPIT background processes should resolve the issue.

sudo systemctl stop naemon
sudo systemctl stop gearman-job-server
sudo systemctl restart gearman_worker
sudo systemctl restart sudo_server

sudo systemctl start gearman-job-server
sudo systemctl start naemon
jharl commented 5 years ago

this is the output from running commands

jack@nag:~$ sudo -s
[sudo] password for jack: 
root@nag:~# systemctl stop neamon
Failed to stop neamon.service: Unit neamon.service not loaded.
root@nag:~# systemctl stop naemon
root@nag:~# systemctl stop gearman-job-server
root@nag:~# systemctl restart gearman-worker
Failed to restart gearman-worker.service: Unit gearman-worker.service not found.
root@nag:~# systemctl restart gearman_worker
root@nag:~# systemctl restart sudo_server
root@nag:~# systemctl start gearman-job-server
root@nag:~# systemctl start naemon
Job for naemon.service failed because the control process exited with error code. See "systemctl status naemon.service" and "journalctl -xe" for details.
root@nag:~# systemctl start naemon
Job for naemon.service failed because the control process exited with error code. See "systemctl status naemon.service" and "journalctl -xe" for details.
root@nag:~# systemctl status naemon.service
● naemon.service - Naemon Monitoring Daemon
   Loaded: loaded (/lib/systemd/system/naemon.service; enabled; vendor preset: e
   Active: failed (Result: exit-code) since Tue 2019-02-19 11:04:24 EST; 1min 3s
     Docs: http://naemon.org/documentation
  Process: 63774 ExecStart=/opt/openitc/nagios/bin/naemon -d /etc/openitcockpit/
  Process: 63765 ExecStartPre=/opt/openitc/nagios/bin/naemon -v /etc/openitcockp

Feb 19 11:04:22 nag systemd[1]: Starting Naemon Monitoring Daemon...
Feb 19 11:04:24 nag systemd[1]: naemon.service: Control process exited, code=exi
Feb 19 11:04:24 nag systemd[1]: Failed to start Naemon Monitoring Daemon.
Feb 19 11:04:24 nag systemd[1]: naemon.service: Unit entered failed state.
Feb 19 11:04:24 nag systemd[1]: naemon.service: Failed with result 'exit-code'.
lines 1-12/12 (END)...skipping...
● naemon.service - Naemon Monitoring Daemon
   Loaded: loaded (/lib/systemd/system/naemon.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2019-02-19 11:04:24 EST; 1min 3s ago
     Docs: http://naemon.org/documentation
  Process: 63774 ExecStart=/opt/openitc/nagios/bin/naemon -d /etc/openitcockpit/nagios.cfg (code=exited, status=1/FAILURE)
  Process: 63765 ExecStartPre=/opt/openitc/nagios/bin/naemon -v /etc/openitcockpit/nagios.cfg (code=exited, status=0/SUCCESS)

Feb 19 11:04:22 nag systemd[1]: Starting Naemon Monitoring Daemon...
Feb 19 11:04:24 nag systemd[1]: naemon.service: Control process exited, code=exited status=1
Feb 19 11:04:24 nag systemd[1]: Failed to start Naemon Monitoring Daemon.
Feb 19 11:04:24 nag systemd[1]: naemon.service: Unit entered failed state.
Feb 19 11:04:24 nag systemd[1]: naemon.service: Failed with result 'exit-code'.
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
lines 1-12/12 (END)

this is the screen after restart of the above daemons

image

journalctl output

root@nag:~# journalctl -xe
Feb 19 11:34:57 nag docker-compose[3015]: carbon-cache01_1  | 19/02/2019 16:34:57 :: [console] Sorted 18 cache queues in 0.000030 seconds
Feb 19 11:34:59 nag docker-compose[3015]: carbon-cache01_1  | 19/02/2019 16:34:59 :: [listener] MetricLineReceiver connection with 172.18.0.5:
Feb 19 11:34:59 nag docker-compose[3015]: carbon-cache02_1  | 19/02/2019 16:34:59 :: [listener] MetricLineReceiver connection with 172.18.0.5:
Feb 19 11:35:01 nag CRON[69145]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 19 11:35:01 nag CRON[69144]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 19 11:35:01 nag CRON[69147]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 19 11:35:01 nag CRON[69146]: (root) CMD ( sudo -g www-data /usr/share/openitcockpit/app/Console/cake cronjobs -q)
Feb 19 11:35:01 nag CRON[69144]: pam_unix(cron:session): session closed for user root
Feb 19 11:35:01 nag sudo[69149]:     root : TTY=unknown ; PWD=/root ; USER=root ; GROUP=www-data ; COMMAND=/usr/share/openitcockpit/app/Consol
Feb 19 11:35:01 nag sudo[69149]: pam_unix(sudo:session): session opened for user root by (uid=0)
Feb 19 11:35:02 nag sudo[69149]: pam_unix(sudo:session): session closed for user root
Feb 19 11:35:02 nag CRON[69145]: pam_unix(cron:session): session closed for user root
Feb 19 11:35:18 nag kernel: [UFW BLOCK] IN=eth0 OUT= MAC=3a:9f:3d:2c:8f:35:f4:f5:d8:7a:7a:7a:08:00 SRC=172.26.25.158 DST=172.26.25.137 LEN=545
Feb 19 11:35:18 nag kernel: [UFW BLOCK] IN=eth0 OUT= MAC=3a:9f:3d:2c:8f:35:74:df:bf:19:2b:f7:08:00 SRC=172.26.25.95 DST=172.26.25.137 LEN=341 
Feb 19 11:35:19 nag kernel: [UFW BLOCK] IN=eth0 OUT= MAC=3a:9f:3d:2c:8f:35:f4:f5:d8:7a:7a:7a:08:00 SRC=172.26.25.158 DST=172.26.25.137 LEN=545
Feb 19 11:35:19 nag kernel: [UFW BLOCK] IN=eth0 OUT= MAC=3a:9f:3d:2c:8f:35:74:df:bf:19:2b:f7:08:00 SRC=172.26.25.95 DST=172.26.25.137 LEN=341 
Feb 19 11:35:20 nag kernel: [UFW BLOCK] IN=eth0 OUT= MAC=3a:9f:3d:2c:8f:35:f4:f5:d8:7a:7a:7a:08:00 SRC=172.26.25.158 DST=172.26.25.137 LEN=545
Feb 19 11:35:20 nag kernel: [UFW BLOCK] IN=eth0 OUT= MAC=3a:9f:3d:2c:8f:35:74:df:bf:19:2b:f7:08:00 SRC=172.26.25.95 DST=172.26.25.137 LEN=341 
Feb 19 11:35:54 nag docker-compose[3015]: carbon-cache02_1  | 19/02/2019 16:35:54 :: [console] Queue consumed in 58.060479 seconds
Feb 19 11:35:54 nag docker-compose[3015]: carbon-cache02_1  | 19/02/2019 16:35:54 :: [console] Sorted 18 cache queues in 0.000033 seconds
Feb 19 11:35:55 nag docker-compose[3015]: carbon-cache01_1  | 19/02/2019 16:35:55 :: [console] Queue consumed in 58.228233 seconds
Feb 19 11:35:55 nag docker-compose[3015]: carbon-cache01_1  | 19/02/2019 16:35:55 :: [console] Sorted 18 cache queues in 0.000044 seconds
Feb 19 11:35:56 nag docker-compose[3015]: carbon-cache01_1  | 19/02/2019 16:35:56 :: [listener] MetricLineReceiver connection with 172.18.0.5:
Feb 19 11:35:56 nag docker-compose[3015]: carbon-cache02_1  | 19/02/2019 16:35:56 :: [listener] MetricLineReceiver connection with 172.18.0.5:
Feb 19 11:35:56 nag docker-compose[3015]: carbon-cache02_1  | 19/02/2019 16:35:56 :: [console] Queue consumed in 2.023255 seconds
Feb 19 11:35:56 nag docker-compose[3015]: carbon-cache02_1  | 19/02/2019 16:35:56 :: [console] Sorted 24 cache queues in 0.000034 seconds
Feb 19 11:35:57 nag docker-compose[3015]: carbon-cache01_1  | 19/02/2019 16:35:57 :: [console] Queue consumed in 2.004678 seconds
Feb 19 11:35:57 nag docker-compose[3015]: carbon-cache01_1  | 19/02/2019 16:35:57 :: [console] Sorted 18 cache queues in 0.000051 seconds
Feb 19 11:35:59 nag docker-compose[3015]: carbon-cache01_1  | 19/02/2019 16:35:59 :: [listener] MetricLineReceiver connection with 172.18.0.5:
Feb 19 11:35:59 nag docker-compose[3015]: carbon-cache02_1  | 19/02/2019 16:35:59 :: [listener] MetricLineReceiver connection with 172.18.0.5:
Feb 19 11:36:01 nag CRON[69216]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 19 11:36:01 nag CRON[69217]: (root) CMD ( sudo -g www-data /usr/share/openitcockpit/app/Console/cake cronjobs -q)
Feb 19 11:36:01 nag sudo[69218]:     root : TTY=unknown ; PWD=/root ; USER=root ; GROUP=www-data ; COMMAND=/usr/share/openitcockpit/app/Consol
Feb 19 11:36:01 nag sudo[69218]: pam_unix(sudo:session): session opened for user root by (uid=0)
Feb 19 11:36:01 nag sudo[69218]: pam_unix(sudo:session): session closed for user root
Feb 19 11:36:01 nag CRON[69216]: pam_unix(cron:session): session closed for user root
lines 1043-1078/1078 (END)
nook24 commented 5 years ago

I'm assuming that this issue relates to #920. So you getting this errors on the same machine? If so, you should install openITCOCKPIT on a fresh Ubuntu system without installing additional software upfront.

If you facing this this error on an other system, you should take a look at the log files at /usr/share/openitcockpit/app/tmp/logs and /var/log/nginx/cake

jharl commented 5 years ago

so this instance is a new vm woth the guest tool install and updated.

I am installing naemon first the openitcockpit, should I do the reverse? any software that was installed was required from dependencies. I will try to install in reverse and see if that works.

thanks jharl

nook24 commented 5 years ago

@jharl

I am installing naemon first the openitcockpit

What? This confuses me... Please just follow the documentation. There is no need to install Naemon (or any other package) manually.

From the docs:

Ubuntu Xenial:

sudo /bin/bash
apt-get install apt-transport-https curl
curl https://packages.openitcockpit.com/072783CB.txt | apt-key add

echo 'deb https://packages.openitcockpit.com/repositories/xenial xenial main' > /etc/apt/sources.list.d/openitcockpit.list

apt-get update
apt-get install openitcockpit{,-common,-naemon,-statusengine-naemon,-message}

Ubuntu Bionic

sudo /bin/bash

apt-get install apt-transport-https curl
curl https://packages.openitcockpit.com/072783CB.txt | apt-key add

echo 'deb https://packages.openitcockpit.com/repositories/bionic bionic main' > /etc/apt/sources.list.d/openitcockpit.list

apt-get update
apt-get install openitcockpit{,-common,-naemon,-statusengine-naemon,-message}

If apt is done, follow the setup wizard to make basic configuration:

/usr/share/openitcockpit/app/SETUP.sh

Docs: https://openitcockpit.io/download/ Video: https://asciinema.org/a/161242

nook24 commented 5 years ago

Feel free to open a new issue if you run into any future problems.