Perl Script Stopped Updating

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
gascione
Posts: 15
Joined: Mon Jun 02, 2003 5:04 pm
Location: Princeton
Contact:

Perl Script Stopped Updating

Post by gascione »

I had a dozen perl scripts monitoring some linux functions along with 30 or more generic SNMP monitors for bandwidth and other things on some servers. I added two more SNMP monitors today and now none of the perl scripts work any longer. If I execute them from the command line they are fine. The RRD files are update but no data appears. I set all the logging to the highest level of debugging and nothing, no errors. I have cleared the poller cache at least a dozen times, rebooted the server, nothing. These scripts were working fine for the past three months. I'm using revision "b", tried to install "c" but I couldn't even get that working. I also found that cactid doesn't update any of the rrd files for any perl scripts written so I'm stuck with cmd.php.

Anyone have any ideas. I'm so tired of the quirks in this!

George :evil:
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

There is a major issue in Cacti 0.8.6b that causes the poller to crash. Your best bet is to upgrade to Cacti 0.8.6c to correct your problem. There are no database changes between releases. Therefore, only files are updated.

Another issue, as the poller is crashed, a table will become filled with data for the RRD process to output. It is called poller_output. If this table get's too large, your poller will consistently time out because php does not have enough memory to read the table.

There are a few 0.8.6b patches if you are a little frustrated. Just go to the patches directory and download the appropriate files.

If your poller_output table has too many rows, just execute the following command from mysql:

mysql --user=root --password cacti
> truncate table poller_output;
> quit

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
gascione
Posts: 15
Joined: Mon Jun 02, 2003 5:04 pm
Location: Princeton
Contact:

Post by gascione »

TheWitness wrote:There is a major issue in Cacti 0.8.6b that causes the poller to crash. Your best bet is to upgrade to Cacti 0.8.6c to correct your problem. There are no database changes between releases. Therefore, only files are updated.

Another issue, as the poller is crashed, a table will become filled with data for the RRD process to output. It is called poller_output. If this table get's too large, your poller will consistently time out because php does not have enough memory to read the table.

There are a few 0.8.6b patches if you are a little frustrated. Just go to the patches directory and download the appropriate files.

If your poller_output table has too many rows, just execute the following command from mysql:

mysql --user=root --password cacti
> truncate table poller_output;
> quit

TheWitness
Thank you, I will try all of your suggestions first thing this morning. I guess it does appear that I am frustrated, I am. I had this finally working then a simple change blew it away.

George
gascione
Posts: 15
Joined: Mon Jun 02, 2003 5:04 pm
Location: Princeton
Contact:

Not updating Perl Scripts

Post by gascione »

I tried the fixes you recommended. Upgraded Cacti as well. It didn't help. I finally found out that all of the Data Sources for the Perl scripts changed to Generic SNMP instead of the scripts. They were not intentionally changed, they changed on their own. This is the source of the frustration, I have no idea why they changed. I changed them all back and now data is being logged to the correct RRA.

I am still having a problem with cactid and the scripts. If I use the binary instead of the cmd.php none of the perl script rra's get updated. I switched the poller to the binary and looked at the time/date stamp of all the rra's. After the normal 5 minute update I then reviewed the time/date stamps and all the RRA's were updated except the ones that called the perl scripts.

This just doesn't work for perl scripts. Any thoughts?

George
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Did you resently import a template?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Run cactid 1 time from the command line in debug and post your results.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
gascione
Posts: 15
Joined: Mon Jun 02, 2003 5:04 pm
Location: Princeton
Contact:

Post by gascione »

rony wrote:Did you resently import a template?
No, didn't import a template.

George
gascione
Posts: 15
Joined: Mon Jun 02, 2003 5:04 pm
Location: Princeton
Contact:

Run in debug, cactid on, no RRA's for perl scripts updated

Post by gascione »

TheWitness wrote:Run cactid 1 time from the command line in debug and post your results.

TheWitness
Last edited by gascione on Wed Feb 02, 2005 7:19 am, edited 1 time in total.
gascione
Posts: 15
Joined: Mon Jun 02, 2003 5:04 pm
Location: Princeton
Contact:

More Information

Post by gascione »

It seems that some of the perl scripts are working fine, the one that isn't is a script that I modified. I took the loadavg script and modified to accept a single parameter, the remote computer host name. I use a wget inside the load avg to query a 1 line PHP script on the remote computer which returns the uptime string from a linux server. It's dirty but works great and literally no overhead.

This script works fine from the command line, and fine when run normally in cacti using cmd.php. It doesn't work with cactid. Could it be the parameter being passed to the script?

George
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ok George, if you would have listened the first time, I would not have to be posting so listen:

PLEASE RUN CACTID from the COMMAND LINE, do not run poller, all you need to do is the following:

$mycacti_dir>./cactid

Do it in debug, it will get all the hosts by default.

Thanks,

TheWitness

p.s. Don't mean to be nasty, just tired.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
gascione
Posts: 15
Joined: Mon Jun 02, 2003 5:04 pm
Location: Princeton
Contact:

Post by gascione »

TheWitness wrote:Ok George, if you would have listened the first time, I would not have to be posting so listen:

PLEASE RUN CACTID from the COMMAND LINE, do not run poller, all you need to do is the following:

$mycacti_dir>./cactid

Do it in debug, it will get all the hosts by default.

Thanks,

TheWitness

p.s. Don't mean to be nasty, just tired.
Thanks for the help. Would you rather me send it to you as an attachment? I'ts lenghty.

George
maxpower
Posts: 3
Joined: Mon Jul 12, 2004 2:27 pm

Post by maxpower »

Just as a side note, I also had this same problem happen. I believe that it actually happened, for me, when upgrading the version of PHP on the server running cacti. Perl scripts run fine from command line, but cacti just stopped graphing them.

If you need to be graphing these things in the meantime, you could set up net-snmp on the localhost to execute the scripts for you and output them to SNMP OIDs. It's a temporary work around, but it's something to help get by. Read the man page on "snmpd.conf" if you need instructions on how to do this. Very quick and easy to do.
gascione
Posts: 15
Joined: Mon Jun 02, 2003 5:04 pm
Location: Princeton
Contact:

Post by gascione »

maxpower wrote:Just as a side note, I also had this same problem happen. I believe that it actually happened, for me, when upgrading the version of PHP on the server running cacti. Perl scripts run fine from command line, but cacti just stopped graphing them.

If you need to be graphing these things in the meantime, you could set up net-snmp on the localhost to execute the scripts for you and output them to SNMP OIDs. It's a temporary work around, but it's something to help get by. Read the man page on "snmpd.conf" if you need instructions on how to do this. Very quick and easy to do.
Thanks I will check into the net-snmp work around. I didn't do any upgrades on this machine, basically took a clean machine and installed cacti.

George
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

E-Mail is fine.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest