Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Oct 20, 2018 10:43 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 82 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Wed Jan 10, 2018 11:50 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1518
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.

_________________
Official Cacti Developer

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

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Wed Jan 10, 2018 11:54 am 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
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


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Wed Jan 10, 2018 12:06 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1518
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 :)

_________________
Official Cacti Developer

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

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Wed Jan 10, 2018 12:09 pm 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
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


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Wed Jan 10, 2018 12:41 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1518
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:
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

_________________
Official Cacti Developer

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

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Wed Jan 10, 2018 1:14 pm 
Offline
Cacti User

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


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Thu Jan 11, 2018 8:16 am 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
looks like monitor is now working! awesome


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Thu Jan 11, 2018 9:21 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1518
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)

_________________
Official Cacti Developer

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

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Thu Jan 11, 2018 9:52 am 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
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.


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Thu Jan 11, 2018 1:30 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1518
tbh it sounds like you did far more work than i did lol

_________________
Official Cacti Developer

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

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Thu Jan 11, 2018 2:44 pm 
Offline
Cacti User

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


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Fri Jan 12, 2018 7:41 am 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
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?


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Fri Jan 12, 2018 7:54 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1518
are you using the latest version from github?

_________________
Official Cacti Developer

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

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Fri Jan 12, 2018 8:11 am 
Offline
Cacti User

Joined: Tue Aug 26, 2014 2:58 pm
Posts: 58
yeah. it renders find in firefox. but not in IE.. (I know.. don't flame the IE user LOL)


Top
 Profile  
 
 Post subject: Re: cacti DB failed, updgrade lost everything
PostPosted: Fri Jan 12, 2018 5:47 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1518
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 :)

_________________
Official Cacti Developer

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

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 82 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group