Cacti 0.8.7i > In State Column
Moderators: Developers, Moderators
Cacti 0.8.7i > In State Column
hy,
in cacti 0.8.7i, what is the "In State" column in the device list ?
which plugin modify this value ?
Laurent
in cacti 0.8.7i, what is the "In State" column in the device list ?
which plugin modify this value ?
Laurent
Cacti 0.8.7g - Windows - poller type : spine
php 5.2.14 - MySQL 5.1.47
php 5.2.14 - MySQL 5.1.47
Re: Cacti 0.8.7i > In State Column
It shows duration time since the device was down.
See also: http://forums.cacti.net/viewtopic.php?f=21&t=44948
Code: Select all
feature: Replace "event count" with last changed date for host availability
Re: Cacti 0.8.7i > In State Column
hello,noname wrote:It shows duration time since the device was down.See also: http://forums.cacti.net/viewtopic.php?f=21&t=44948Code: Select all
feature: Replace "event count" with last changed date for host availability
ok but why some of my device have no value ?
Cacti 0.8.7g - Windows - poller type : spine
php 5.2.14 - MySQL 5.1.47
php 5.2.14 - MySQL 5.1.47
Re: Cacti 0.8.7i > In State Column
>> ok but why some of my device have no value ?
I'm not sure. Is the device down?
I'm not sure. Is the device down?
Re: Cacti 0.8.7i > In State Column
no, they are UP.noname wrote:>> ok but why some of my device have no value ?
I'm not sure. Is the device down?
manage plugin is installed and they are manage.
Cacti 0.8.7g - Windows - poller type : spine
php 5.2.14 - MySQL 5.1.47
php 5.2.14 - MySQL 5.1.47
Re: Cacti 0.8.7i > In State Column
>> no, they are UP.
Then they won't show anything at that column. It's normal. :)
Then they won't show anything at that column. It's normal. :)
Re: Cacti 0.8.7i > In State Column
OK, so what is the signification of this column ?noname wrote:>> no, they are UP.
Then they won't show anything at that column. It's normal.
Cacti 0.8.7g - Windows - poller type : spine
php 5.2.14 - MySQL 5.1.47
php 5.2.14 - MySQL 5.1.47
Re: Cacti 0.8.7i > In State Column
Here is my sample (but this is on Cacti 0.8.7g + new host.php):
I turned off "Downed Device Detection" for Test E.
I turned off "Downed Device Detection" for Test E.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Cacti 0.8.7i > In State Column
In case Cacti has always seen the device as UP, there has been no "status change", hence no "up since ..." value
R.
R.
Re: Cacti 0.8.7i > In State Column
ok thanks.gandalf wrote:In case Cacti has always seen the device as UP, there has been no "status change", hence no "up since ..." value
R.
Cacti 0.8.7g - Windows - poller type : spine
php 5.2.14 - MySQL 5.1.47
php 5.2.14 - MySQL 5.1.47
Re: Cacti 0.8.7i > In State Column
Even more strange, my devices up and everything is OK with graphs, but the value of "In State" is: 4460d 10h 40m for all of them.
Any idea???
Any idea???
Re: Cacti 0.8.7i > In State Column
I have the same issue currently with my 'In State' countersgrodno5 wrote:Even more strange, my devices up and everything is OK with graphs, but the value of "In State" is: 4460d 10h 40m for all of them.
Any idea???
I just added a system and it automatically added 4472d 15h 12m
Re: Cacti 0.8.7i > In State Column
>> I just added a system and it automatically added 4472d 15h 12m
Perform this to verify:
% mysql -u YOUR_DB_USER -p -t cacti -e 'SELECT id,status_event_count,status_rec_date FROM host;'
% php --version
% php -r 'var_dump(strtotime("0000-00-00 00:00:00"));'
And try this workaround in host.php:
Perform this to verify:
% mysql -u YOUR_DB_USER -p -t cacti -e 'SELECT id,status_event_count,status_rec_date FROM host;'
% php --version
% php -r 'var_dump(strtotime("0000-00-00 00:00:00"));'
And try this workaround in host.php:
function get_timeinstate($host) {
...
}elseif ($host['status_rec_date'] != "0000-00-00 00:00:00" && strtotime($host['status_rec_date']) > 943916400) {
$time = time() - strtotime($host['status_rec_date']);
...
Re: Cacti 0.8.7i > In State Column
Hi, try to update your database by following the instruction below.
STEP1: Go to your /var/www/html/cacti/lib and edit the functions.php file.
change this command:
$hosts[$host_id]["status_fail_date"] = '0000-00-00 00:00:00';
$hosts[$host_id]["status_rec_date"] = '0000-00-00 00:00:00';
to this:
if ($hosts[$host_id]["status_fail_date"] == ""){
$hosts[$host_id]["status_fail_date"] = '0000-00-00 00:00:00';}
if ($hosts[$host_id]["status_rec_date"] == ""){
$hosts[$host_id]["status_rec_date"] = '0000-00-00 00:00:00';}
then save.
STEP2:
Go to your cacti database
#mysql -u [username] -p [database name]
It will prompt you to enter your password.
Then after entering your password try to execute this command to your mysql command line:
mysql>UPDATE host SET status_fail_date = '2013-08-10 00:00:00';
mysql>UPDATE host SET status_rev_date = '2013-08-10 00:00:00';
Just update the date that highlighted.
Hope it help you.
STEP1: Go to your /var/www/html/cacti/lib and edit the functions.php file.
change this command:
$hosts[$host_id]["status_fail_date"] = '0000-00-00 00:00:00';
$hosts[$host_id]["status_rec_date"] = '0000-00-00 00:00:00';
to this:
if ($hosts[$host_id]["status_fail_date"] == ""){
$hosts[$host_id]["status_fail_date"] = '0000-00-00 00:00:00';}
if ($hosts[$host_id]["status_rec_date"] == ""){
$hosts[$host_id]["status_rec_date"] = '0000-00-00 00:00:00';}
then save.
STEP2:
Go to your cacti database
#mysql -u [username] -p [database name]
It will prompt you to enter your password.
Then after entering your password try to execute this command to your mysql command line:
mysql>UPDATE host SET status_fail_date = '2013-08-10 00:00:00';
mysql>UPDATE host SET status_rev_date = '2013-08-10 00:00:00';
Just update the date that highlighted.
Hope it help you.
Re: Cacti 0.8.7i > In State Column
Hello,
Brand new user to Cacti (trying v0.8.8b), and have just come across this same issue and followed the steps in the last post. This appeared to work, but only for existing devices.
When I added a new device, the "In State" column was back to "5194d 17h 47m". What exactly is the deal here? Is it a bug? A compatibility issue between certain versions of PHP and MySQL?
I'm not a coder, so if someone could explain if there's a permanent fix, I would be very grateful.
Thank you!
Brand new user to Cacti (trying v0.8.8b), and have just come across this same issue and followed the steps in the last post. This appeared to work, but only for existing devices.
When I added a new device, the "In State" column was back to "5194d 17h 47m". What exactly is the deal here? Is it a bug? A compatibility issue between certain versions of PHP and MySQL?
I'm not a coder, so if someone could explain if there's a permanent fix, I would be very grateful.
Thank you!
Cacti v0.8.8b - CentOS5 - PHP 5.1.6 - MySQL v5.0.95
Who is online
Users browsing this forum: No registered users and 1 guest