cacti DB failed, updgrade lost everything

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti DB failed, updgrade lost everything

Post by netniV »

If you are using the latest Cacti, make sure you have the latest plugin for monitor from the repo too. If you do, I'll take a look at the line in question but generally $config is globally defined so shouldn't be having issues.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
mrscary
Cacti User
Posts: 149
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

Post by mrscary »

I looked at the file and couldn't figure out what was wrong. its weird.. I got one notification about a downed device.. but not the one im trying to force getting a notification on.. its NOT on.. and cacti says "UP" LOL
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti DB failed, updgrade lost everything

Post by netniV »

Do you have thold installed as well? Make sure that is also up to date. If you are working with the up to date versions, I'll run through some things to check tomorrow :)
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
mrscary
Cacti User
Posts: 149
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

Post by mrscary »

yeah I got the latest from github. I had to get a new functions.php for thold to install.

2018/01/10 11:05:32 - SYSTEM MONITOR STATS: Time:0.17 Reboots:0 DownDevices:0 Notifications:0 Purges:0
2018/01/10 11:05:32 - SYSTEM DSSTATS STATS: Type:HOURLY, Time:0.1600
2018/01/10 11:05:31 - SYSTEM THOLD DAEMON STATS: TotalTime:0.000 MaxRuntime:0.000 Processed:0 InProcess:24 TotalDevices:66 DownDevices:3 NewDownDevices:0 MaxProcesses:4 Completed:0 Running:0 Broken:0
2018/01/10 11:05:30 - SYSTEM STATS: Time:30.3067 Method:cmd.php Processes:4 Threads:N/A Hosts:66 HostsPerProcess:17 DataSources:3798 RRDsProcessed:0


there are more than 0 down.. LOL sad to say that but I know there's one downed device I downed on purpose for testing.
Monitor Device Monitoring Active The Cacti Group 2.2
Thold Thresholds Active The Cacti Group 1.0.4
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti DB failed, updgrade lost everything

Post by netniV »

Well that stats line comes from this:

$total_hosts = db_fetch_cell_prepared('SELECT count(*)
FROM host
WHERE disabled=""
AND poller_id = ?',
array($config['poller_id']));

$down_hosts = db_fetch_cell_prepared('SELECT count(*)
FROM host
WHERE status=1
AND disabled=""
AND poller_id = ?',
array($config['poller_id']));

That status = 1 is what is causing it to think those devices are down. Something definitely set them as down. The full array of known values are:

Code: Select all

array(
        0 => 'deviceUnknown',
        1 => 'deviceDown',
        2 => 'deviceRecovering',
        3 => 'deviceUp',
        4 => 'deviceThreshold',
        5 => 'deviceDownMuted',
        6 => 'deviceUnmonitored',
        7 => 'deviceWarning',
        8 => 'deviceAlert',
)
However, other plugins can set a device status too
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
mrscary
Cacti User
Posts: 149
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

Post by mrscary »

the only plug ins on the plug page I have enabled are thold and monitor
mrscary
Cacti User
Posts: 149
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

Post by mrscary »

looks like monitor is now working! awesome
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti DB failed, updgrade lost everything

Post by netniV »

So, do we have a fully working system now? You may also want to download the version of monitor I have here:
https://github.com/netniV/plugin_monito ... /tag/28-45

It fixes a problem with displaying things when they have an invalid status (also adds the ability to auto-monitor devices added via cli)
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
mrscary
Cacti User
Posts: 149
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

Post by mrscary »

it appears all is working.. thank you so much for your efforts!
I have hp printer that is being a PITA and not giving me toner status.. that's new.. LOL same model printers work for other devices, so its probably that printer's internal issue.. dang printers.
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti DB failed, updgrade lost everything

Post by netniV »

tbh it sounds like you did far more work than i did lol
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
mrscary
Cacti User
Posts: 149
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

Post by mrscary »

I wasn't gonna give in.. I was determined to keep my data! LOL
mrscary
Cacti User
Posts: 149
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

Post by mrscary »

mrscary wrote:this is a plug in I found particularly useful
https://docs.cacti.net/userplugin:intropage
question about this plug in.. by default puts all the boxes in one row.. but the screen shot shown is much nicer.. how does one change this layout?
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti DB failed, updgrade lost everything

Post by netniV »

are you using the latest version from github?
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
mrscary
Cacti User
Posts: 149
Joined: Tue Aug 26, 2014 2:58 pm

Re: cacti DB failed, updgrade lost everything

Post by mrscary »

yeah. it renders find in firefox. but not in IE.. (I know.. don't flame the IE user LOL)
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: cacti DB failed, updgrade lost everything

Post by netniV »

I'd have to defer to the author on that one.

If you can let me know what you think to this release of QuickTree:
https://github.com/netniV/cacti-quicktr ... 1.0-beta.2

It's had quite a bit of a rework but it's still the same underlying functionality :)
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests