Real Time Graphics - HTML5 and GAUGES

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Cristhian_Plaza
Posts: 62
Joined: Thu Oct 27, 2016 2:43 pm

Re: Real Time Graphics - HTML5 and GAUGES

Post by Cristhian_Plaza »

dwhitfield wrote:Can you post the output of history into a code block?

If you are concerned about security, you can PM it to me. If you choose to PM, please make sure you update this post after PMing.
Excuse me, what history??? Can u explain?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Real Time Graphics - HTML5 and GAUGES

Post by ssax »

He was just asking you to run the command history (just type history and hit enter) so that he can see what you did before those last lines you posted.

Thank you
Cristhian_Plaza
Posts: 62
Joined: Thu Oct 27, 2016 2:43 pm

Re: Real Time Graphics - HTML5 and GAUGES

Post by Cristhian_Plaza »

ssax wrote:He was just asking you to run the command history (just type history and hit enter) so that he can see what you did before those last lines you posted.

Thank you
Yes, I already did it¡ I didn't know, Im sorry
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Real Time Graphics - HTML5 and GAUGES

Post by dwhitfield »

Please undo all the ndo stuff you did before, and then run through the following steps to reinstall.

Code: Select all

yum install -y mariadb mariadb-server mariadb-devel
systemctl start mariadb.service
systemctl enable mariadb.service
/usr/bin/mysqladmin -u root password 'mypassword'
mysql -u root -p'mypassword'
CREATE DATABASE nagios DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'ndoutils'@'localhost' IDENTIFIED BY 'ndoutils_password';
GRANT USAGE ON *.* TO 'ndoutils'@'localhost' IDENTIFIED BY 'ndoutils_password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; 
GRANT ALL PRIVILEGES ON nagios.* TO 'ndoutils'@'localhost' WITH GRANT OPTION ;
\q
cp /etc/sysctl.conf /etc/sysctl.conf_backup
sed -i '/msgmnb/d' /etc/sysctl.conf
sed -i '/msgmax/d' /etc/sysctl.conf
sed -i '/shmmax/d' /etc/sysctl.conf
sed -i '/shmall/d' /etc/sysctl.conf
printf "\n\nkernel.msgmnb = 131072000\n" >> /etc/sysctl.conf
printf "kernel.msgmax = 131072000\n" >> /etc/sysctl.conf
printf "kernel.shmmax = 4294967295\n" >> /etc/sysctl.conf
printf "kernel.shmall = 268435456\n" >> /etc/sysctl.conf
sysctl -e -p /etc/sysctl.conf
cd /tmp
wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/archive/2.1.1.tar.gz
tar xzf ndoutils.tar.gz
cd /tmp/ndoutils-2.1.1/
./configure
make all
make install
cd db/
./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
cd ..
make install-config
mv /usr/local/nagios/etc/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_user=.*/db_user=ndoutils/g' /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_pass=.*/db_pass=ndoutils_password/g' /usr/local/nagios/etc/ndo2db.cfg
mv /usr/local/nagios/etc/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
make install-init
systemctl enable ndo2db.service
systemctl start ndo2db.service
printf "\n\n# NDOUtils Broker Module\n" >> /usr/local/nagios/etc/nagios.cfg
printf "broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg\n" >> /usr/local/nagios/etc/nagios.cfg
systemctl restart nagios.service
systemctl status nagios.service
Please let us know if you run into any issues. Please provide any associated error messages.
Cristhian_Plaza
Posts: 62
Joined: Thu Oct 27, 2016 2:43 pm

Re: Real Time Graphics - HTML5 and GAUGES

Post by Cristhian_Plaza »

dwhitfield wrote:Please undo all the ndo stuff you did before, and then run through the following steps to reinstall.

Code: Select all

yum install -y mariadb mariadb-server mariadb-devel
systemctl start mariadb.service
systemctl enable mariadb.service
/usr/bin/mysqladmin -u root password 'mypassword'
mysql -u root -p'mypassword'
CREATE DATABASE nagios DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'ndoutils'@'localhost' IDENTIFIED BY 'ndoutils_password';
GRANT USAGE ON *.* TO 'ndoutils'@'localhost' IDENTIFIED BY 'ndoutils_password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; 
GRANT ALL PRIVILEGES ON nagios.* TO 'ndoutils'@'localhost' WITH GRANT OPTION ;
\q
cp /etc/sysctl.conf /etc/sysctl.conf_backup
sed -i '/msgmnb/d' /etc/sysctl.conf
sed -i '/msgmax/d' /etc/sysctl.conf
sed -i '/shmmax/d' /etc/sysctl.conf
sed -i '/shmall/d' /etc/sysctl.conf
printf "\n\nkernel.msgmnb = 131072000\n" >> /etc/sysctl.conf
printf "kernel.msgmax = 131072000\n" >> /etc/sysctl.conf
printf "kernel.shmmax = 4294967295\n" >> /etc/sysctl.conf
printf "kernel.shmall = 268435456\n" >> /etc/sysctl.conf
sysctl -e -p /etc/sysctl.conf
cd /tmp
wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/archive/2.1.1.tar.gz
tar xzf ndoutils.tar.gz
cd /tmp/ndoutils-2.1.1/
./configure
make all
make install
cd db/
./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
cd ..
make install-config
mv /usr/local/nagios/etc/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_user=.*/db_user=ndoutils/g' /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_pass=.*/db_pass=ndoutils_password/g' /usr/local/nagios/etc/ndo2db.cfg
mv /usr/local/nagios/etc/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
make install-init
systemctl enable ndo2db.service
systemctl start ndo2db.service
printf "\n\n# NDOUtils Broker Module\n" >> /usr/local/nagios/etc/nagios.cfg
printf "broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg\n" >> /usr/local/nagios/etc/nagios.cfg
systemctl restart nagios.service
systemctl status nagios.service
Please let us know if you run into any issues. Please provide any associated error messages.
This is my answer.

Code: Select all

sudo yum -y install mariadb-server mariadb-level mariadb
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Package 1:mariadb-server-5.5.52-1.el7.x86_64 is obsoleted by mysql-community-server-5.7.17-1.el7.x86_64 which is already installed
No package mariadb-level available.
Package 1:mariadb-5.5.52-1.el7.x86_64 is obsoleted by mysql-community-client-5.7.17-1.el7.x86_64 which is already installed
Nothing to do
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Real Time Graphics - HTML5 and GAUGES

Post by dwhitfield »

you have a typo. It's mariadb-devel. It's possible you already have it and if you have the mysql version that works just as well.
Cristhian_Plaza
Posts: 62
Joined: Thu Oct 27, 2016 2:43 pm

Re: Real Time Graphics - HTML5 and GAUGES

Post by Cristhian_Plaza »

dwhitfield wrote:you have a typo. It's mariadb-devel. It's possible you already have it and if you have the mysql version that works just as well.
I am already had MySQL on my system, apparently NDOUtils got installed successfully, but here I have an error:

Code: Select all

./installdb -u 'ndoutils' -p 'xxxxxx' -h 'localhost' -d nagios
DBD::mysql::db do failed: Table 'nagios.nagios_dbversion' doesn't exist at ./installdb line 52.
** Creating tables for version 2.0.1
     Using mysql.sql for installation...
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1072 (42000) at line 27: Key column 'logentry_id' doesn't exist in table
Installation from mysql.sql failed at ./installdb line 60.

dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Real Time Graphics - HTML5 and GAUGES

Post by dwhitfield »

What's the output of grep ndo /usr/local/nagios/var/nagios.log?
Cristhian_Plaza
Posts: 62
Joined: Thu Oct 27, 2016 2:43 pm

Re: Real Time Graphics - HTML5 and GAUGES

Post by Cristhian_Plaza »

dwhitfield wrote:What's the output of grep ndo /usr/local/nagios/var/nagios.log?
Nothing, there isn't any output.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Real Time Graphics - HTML5 and GAUGES

Post by dwhitfield »

What's the output of systemctl status nagios.service?

I'm just walking back through the steps to see where things went wrong.
Locked