Script to update ifAlias/ifDescr title via cron

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

thierry.chich wrote:I use Version 0.8.7b of cacti coming form the lenny package.
Forgive my dumbness: what's "lenny"? Please post the results of a

Code: Select all

ls -l ./cli
Reinhard
davecoop
Posts: 1
Joined: Tue May 27, 2008 5:49 pm

Post by davecoop »

I'm having a similar problem with my Cacti graphs. When I go to "Management > Data Sources" I can see that snmp is getting the description on the port:

"svt-sw5 - Traffic - Fa0/18 - Constantin 1"

However then right after I go to "Management > Graph Management" and then I locate my switch then highlight all the ports and select "Reapply Suggested Names" The port descriptions on my switch are not being added to the graph.

-Dave
thierry.chich
Posts: 24
Joined: Tue Jun 14, 2005 7:58 am

Post by thierry.chich »

I have a solution.

With the green circle, I can refresh the index of the

I believe that it is due to the fact that the graph title is produced by the graph template. The graph template can use different versions of tittle (coming from Dataqueries -> SNMP - Interface Statistics -> In-out... -> Associated Graph/Data Templates [edit: SNMP - Interface Statistics])

I have change the order. I have put
title |host_description| - Traffic - |query_ifName| - |query_ifAlias| in first position

And then, I go to Graph Management -> Reapply suggested names
thierry.chich
Posts: 24
Joined: Tue Jun 14, 2005 7:58 am

Post by thierry.chich »

gandalf wrote:
thierry.chich wrote:I use Version 0.8.7b of cacti coming form the lenny package.
Forgive my dumbness: what's "lenny"? Please post the results of a

Code: Select all

ls -l ./cli
Reinhard
There is no ./cli
Lenny is the testing version of debian. Sorry for this short-cut.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

That's bad. In this case, the debian package is either incomplete or puts the scripts into some other directory. If possible, use tar.gz from cacti web site or use SVN.
Reinhard
thierry.chich
Posts: 24
Joined: Tue Jun 14, 2005 7:58 am

Post by thierry.chich »

gandalf wrote:That's bad. In this case, the debian package is either incomplete or puts the scripts into some other directory. If possible, use tar.gz from cacti web site or use SVN.
Reinhard
I will see that with the package maintainer.
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

I took a look at the deb package ( ftp://ftp.debian.org/debian/pool/main/c ... -2_all.deb ), and the cli scripts are not there.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
thierry.chich
Posts: 24
Joined: Tue Jun 14, 2005 7:58 am

Post by thierry.chich »

Linegod wrote:I took a look at the deb package ( ftp://ftp.debian.org/debian/pool/main/c ... -2_all.deb ), and the cli scripts are not there.
Indeed. I have open a bug. I hope I have open a bug.

Ok, I have open two bugs. :) . I believed my smtp server was misconfigured.
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Post by smlick »

I solve that with a simple reapply of the graph template (simply press the save button into graph template) in my case the SNMP interface template.

Bye
xero
Posts: 6
Joined: Thu Jun 11, 2009 4:19 am

Re: Script to update ifAlias/ifDescr title via cron

Post by xero »

As I just stumbled across this question as well, I thought I'd share this (so my post is just a reference).

Running this command (inside the ./cli directory) did the magic for me (Version 0.8.7g)

Code: Select all

php -q poller_graphs_reapply_names.php -id=All
So something like this would be good as a cronjob.

I remember that in earlier versions of Cacti it was sufficient to just hit the "Verbose" link inside the device view. This stopped working with some version.

Also checkout this article in case you need to know more: http://www.cacti.net/downloads/docs/htm ... names.html
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Script to update ifAlias/ifDescr title via cron

Post by TheWitness »

When things stop working, it generally means that one of two settings need to be changed for Apache's PHP settings:

max_execution_time
memory_limit

PHP has been consuming more memory for common things as it has matured. I'm certain that this is not generally an issue, but from time to time, things need to be tuned.

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 5 guests