Moving to 1.4 and issues I have come across

Having issues? Post them here, and help other users.
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: Moving to 1.4 and issues I have come across

Post by Robbie Ferguson »

Well, it's strange to get a JSON error... that seems to mean it's redirecting you to the API... but I guess it's neither here nor there. A curiosity more than a problem.

Yeah, nems.local is used within the local network. The NEMS server has an AVAHI server running to respond to that request. So if you leave off .local, you're instead depending on your networking figuring out that nems is 10.0.0.32. AVAHI isn't foolproof, but it sure helps in name resolution.

Worse comes to worse, you can also do https://10.0.0.32 in your case. The NEMS Dashboard will automatically update all navigation links based on your initial request.

PS - I pushed out a massive upgrade to NEMS Migrator today. Make sure you get it and re-import your backup.nems file (it restores all the missing advanced_services and checkcommands).
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
ronjohntaylor
Member
Posts: 89
Joined: Sun Mar 18, 2018 12:02 am

RE: Moving to 1.4 and issues I have come across

Post by ronjohntaylor »

Morning Robbie,

Re Migrator update...

When did you push it out (I am AEST or +10 GMT) ?
I am assuming that if it was after 00:00 AEST today then I should get it tonight (Thursday) when nightly updates run.

Clarification about re-importing backup.nems....


Are you saying to 
  1. Export or do a backup or use an existing backup?
  2. Import  backup.nems
Just to prove that the process works an/or that the migrator will reinstate missing commands etc even if I am not using them currently?

Cheers
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: Moving to 1.4 and issues I have come across

Post by Robbie Ferguson »

You should have the new version of Migrator by now Ron. You could run sudo nems-update just to be sure.

You can restore your current config to apply the patch, if you prefer (rather than reverting to an old backup).

Easiest way to do this would be:

sudo cp /var/www/html/backup/snapshots/backup.nems /tmp/ && sudo nems-restore /tmp/backup.nems

That will make a copy of your backup.nems file in /tmp (to avoid having it change during import), and then restore from it.

I always recommend you first backup your card. :)

Enjoy,
Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
ronjohntaylor
Member
Posts: 89
Joined: Sun Mar 18, 2018 12:02 am

RE: Moving to 1.4 and issues I have come across

Post by ronjohntaylor »

Robbie
Not sure what's gone wrong but I can't get NConf to add a new host.

I have been playing with a Pi-Zero and SNMP. I have loaded snmp, snmpd  & snmp-mibs-downloader onto the Pi Zero to to some learning!! 
I have done nothing to NEMS!

I decided to add this host to NEMS as pi-zero-1 so ran up NConf to get it to basically have a new host but it will not appear in Nagios Core or Adagios????
I had planned that once I got the Zero visible on NEMS then I would add some snmp_check commands to see if I needed to used the OID format or the MIB format but never got that far.

Attached are some images of my NConf & errors???
There are 22 hosts in NCONF and only 21 in Nagios core!!! ???
View images in the following order
Pi-Zero-1
Zero-3
Zero-4
Zero-2

Is this because I did not run the new migrator/restore as suggested in the previous post?

I backed up (imaged) the NEMS SD card yesterday before I started this exercise.

Ron
Attachments
Zero-2.jpg
Zero-4.jpg
Zero-3.jpg
Pi-Zero-1.jpg
Last edited by ronjohntaylor on Mon Jul 30, 2018 9:08 pm, edited 1 time in total.
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: Moving to 1.4 and issues I have come across

Post by Robbie Ferguson »

Hey Ron,
The only issue I'm seeing there is in Zero-4.jpg - it looks like you did not receive the patch to the deployment bug that was issued a while back. Can you please confirm NEMS is up to date with a sudo nems-update ?

If there is any error output, please post it here so I can confirm this is the issue.

Thanks,
Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
ronjohntaylor
Member
Posts: 89
Joined: Sun Mar 18, 2018 12:02 am

RE: Moving to 1.4 and issues I have come across

Post by ronjohntaylor »

This was the result of the sudo nem-update



PING google.com(syd15s03-in-x0e.1e100.net (2404:6800:4006:804::200e)) 56 data bytes
64 bytes from syd15s03-in-x0e.1e100.net (2404:6800:4006:804::200e): icmp_seq=1 ttl=53 time=43.3 ms

--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 43.378/43.378/43.378/0.000 ms
Updating nems-migrator... Already up-to-date.
Done.
Updating nems-www... Already up-to-date.
Done.
Updating nems-admin... Already up-to-date.
Done.
Updating nems-conf... Already up-to-date.
Done.
Updating nems-scripts... Already up-to-date.
Done.
Running updates and fixes... Please wait for apt tasks to complete...
Done.
Hit:1 http://archive.raspberrypi.org/debian stretch InRelease
Hit:2 http://ftp.debian.org/debian stretch-backports InRelease
Ign:3 http://download.webmin.com/download/repository sarge InRelease
Ign:4 http://webmin.mirror.somersettechsoluti ... repository sarge InRelease
Hit:5 http://webmin.mirror.somersettechsoluti ... repository sarge Release
Hit:6 http://download.webmin.com/download/repository sarge Release
Ign:7 http://giteduberger.fr rpimonitor/ InRelease
Hit:8 http://giteduberger.fr rpimonitor/ Release
Hit:12 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
60 packages can be upgraded. Run 'apt list --upgradable' to see them.
Ign:1 http://download.webmin.com/download/repository sarge InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Hit:3 http://ftp.debian.org/debian stretch-backports InRelease
Hit:4 http://archive.raspberrypi.org/debian stretch InRelease
Ign:5 http://webmin.mirror.somersettechsoluti ... repository sarge InRelease
Hit:6 http://download.webmin.com/download/repository sarge Release
Hit:7 http://webmin.mirror.somersettechsoluti ... repository sarge Release
Ign:8 http://giteduberger.fr rpimonitor/ InRelease
Hit:9 http://giteduberger.fr rpimonitor/ Release
Reading package lists... Done
Building dependency tree
Reading state information... Done
60 packages can be upgraded. Run 'apt list --upgradable' to see them.
Done.

I don't see any errors????
Ron
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: Moving to 1.4 and issues I have come across

Post by Robbie Ferguson »

Great! So now, please run: sudo nems-quickfix

And then see if generating config works (or not).
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
ronjohntaylor
Member
Posts: 89
Joined: Sun Mar 18, 2018 12:02 am

RE: Moving to 1.4 and issues I have come across

Post by ronjohntaylor »

No Good.

I still got the error
source_file
FAILED
Source file does not exist (/tmp/NEMS_Linux/)


Ron
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: Moving to 1.4 and issues I have come across

Post by Robbie Ferguson »

What does this command output?

/usr/bin/mysql -u nconf -h 127.0.0.1 -pnagiosadmin -D nconf -e "SELECT attr_value FROM ConfigValues WHERE fk_id_attr = 1;"
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
ronjohntaylor
Member
Posts: 89
Joined: Sun Mar 18, 2018 12:02 am

RE: Moving to 1.4 and issues I have come across

Post by ronjohntaylor »

/usr/bin/mysql -u nconf -h 127.0.0.1 -pnagiosadmin -D nconf -e "SELECT attr_value FROM ConfigValues WHERE fk_id_attr = 1;"
+----------------+
| attr_value     |
+----------------+
| Default Nagios |
+----------------+
Locked