Monitorix graphs lost on brand new 1.3 Installation

Having issues? Post them here, and help other users.
Post Reply
panda2297
Junior Member
Posts: 19
Joined: Mon Mar 05, 2018 12:04 am

Monitorix graphs lost on brand new 1.3 Installation

Post by panda2297 »

I noticed an issue that I am seeing with NEMS 1.3 that I am trying out. At first I thought this may have been something with trying to change the hostname/IP address in the past.So I tried a new installation and was able to duplicate the behavior. Monitorix graphs do not load.

Here is the sequence of events.

1) Install NEMS as usual onto the Micro SD Card
2) Boot up and SSH via nemsadmin/nemsadmin
3) Run sudo nems-init. Followed all steps and right before it said "Press Any Key to Reboot", I loaded up Monitorix and everything looked good
4) After the reboot, the graph refuses to load. Looked at Montorix logs (var/log/monitorix) when I SSH in and I see the following 

Mon Mar  5 00:50:02 2018 - Exiting.
Mon Mar  5 00:50:03 2018 - Starting Monitorix version 3.9.0 (pid 1104).
Mon Mar  5 00:50:03 2018 - Loaded main configuration file '/etc/monitorix/monitorix.conf'.
Mon Mar  5 00:50:03 2018 - Loading extra configuration file '/etc/monitorix/conf.d/00-debian.conf'.
Mon Mar  5 00:50:03 2018 - Loading extra configuration file '/etc/monitorix/conf.d/nems.conf'.
Mon Mar  5 00:50:03 2018 - Initializing graphs.
Mon Mar  5 00:50:03 2018 - fs::fs_init: Unable to detect the device name of '/'. I/O stats for this filesystem won't be shown in graph. If this is really a mount point then consider using <devmap> to map it manually to a device name.
Mon Mar  5 00:50:04 2018 - Generating the 'index.html' file.
Mon Mar  5 00:50:04 2018 - Started built-in HTTP server (pid 1235).
Mon Mar  5 00:50:04 2018 - Ok, ready.

If I search around on that message, it has something to do with the defined mount points. My theory is that when the resizing occurs, it breaks the graphs from loading here. I'm going to mess around it some more to see if I find anything.
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: Monitorix graphs lost on brand new 1.3 Installation

Post by Robbie Ferguson »

Check again?

Don't let the log fool you, I don't believe the error to be related.

Just give it 5-10 minutes before loading Monitorix after a reboot.

Here's what is happening: Monitorix graphs are stored in RAM to reduce the writes to your SD card and thereby extend its life. Because of this, when you first reboot, all graphs are "deleted" (removed from RAM) and they generate again based on cron tasks (every 5 minutes IIRC) so you just have to give it a few minutes after a reboot before the graphs will appear.

Typically a NEMS server is left running 24/7, so the only time you'd notice this behavior is immediately following a reboot.

Cheers,
Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
panda2297
Junior Member
Posts: 19
Joined: Mon Mar 05, 2018 12:04 am

RE: Monitorix graphs lost on brand new 1.3 Installation

Post by panda2297 »

Looks like you are right! I checked in and the graphs are populating. Now the only thing is I noticed that if I click "Year", I get the same problem with no graph and Updated December 31 1969 19:00:00 EST

Does that mean that NEMS have to be running longer to populate the year's graph?
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: Monitorix graphs lost on brand new 1.3 Installation

Post by Robbie Ferguson »

Nope. Just that because NEMS does not update the year graphs as often (makes sense, right - why update a yearly graph on a 5 minute interval?) you just have to wait longer for the year one.

That said, I recognize this as a chance to improve the UX. I will plan to add a "Check back soon" in place of the error you were getting having not waited long enough. NEMS is always an evolving system, and this will further improve things for the end users, thanks!
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: Monitorix graphs lost on brand new 1.3 Installation

Post by Robbie Ferguson »

Update - I improved the underlying system to force graphs to be initially created faster, and then updated on the regular schedule. This should reduce the issue you experienced. And also, I wrote a patch that now warns a user that the graphs have not been updated yet after a reboot, rather than showing a bunch of broken images.

Thanks for the feedback. This is pretty minor stuff, but improves the overall out-of-the-box experience of NEMS as I implement improvements based on your suggestions.

Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
Post Reply