Simple NNM > CACTI integration script

Addons for Cacti and discussion about those addons

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
Instigater
Cacti User
Posts: 141
Joined: Mon Dec 13, 2004 5:14 pm
Location: Jurmala, Latvia

Simple NNM > CACTI integration script

#1 Post by Instigater » Mon Jan 30, 2012 7:12 am

Put nnm.php script in CACTI root folder. It depends on CACTI functions and parameters defined in global.php.

It redirects to specific device's graphs if hosts hostname matches one in URL.

https://cacti.server.tld/nnm.php?mgmtip=xx.xx.xx.xx
redirects to
https://cacti.server.tld/graph_view.php ... ost_id=yyy
showing all associated to device graphs.

User wil be asked CACTI password (part of default CACTI functionality) and it should have corresponding access rights to "Preview view".
Attachments
nnm.zip
Put in CACTI root
(387 Bytes) Downloaded 171 times

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

Re: Simple NNM > CACTI integration script

#2 Post by gandalf » Mon Jan 30, 2012 4:17 pm

Interesting approach; easy and simple. But works only in case you're using [email protected] as a "hostname". You may add an address lookup in case the table lookup fails.
R.

User avatar
Instigater
Cacti User
Posts: 141
Joined: Mon Dec 13, 2004 5:14 pm
Location: Jurmala, Latvia

Re: Simple NNM > CACTI integration script

#3 Post by Instigater » Wed Feb 01, 2012 8:29 am

Do you mean simple failover DNS resolving action if hostname is asked and not found in cacti db?

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

Re: Simple NNM > CACTI integration script

#4 Post by gandalf » Wed Feb 01, 2012 4:35 pm

Instigater wrote:Do you mean simple failover DNS resolving action if hostname is asked and not found in cacti db?
Yep
R.

User avatar
Instigater
Cacti User
Posts: 141
Joined: Mon Dec 13, 2004 5:14 pm
Location: Jurmala, Latvia

Re: Simple NNM > CACTI integration script

#5 Post by Instigater » Thu Feb 02, 2012 4:16 am

Updated script. Now it listens also to filter parameter. Now it is possible to display specific graphs. DNS failover not implemented yet.

One bug has appeared. If filter parameter still displays more graphs than allowed per one Preview page then hitting "next" link user gets redirected to Tree view. :o Is it somehow related to stored information in cookies?
Attachments
nnm01.png
nnm01.png (143.71 KiB) Viewed 2756 times
nnm02.png
nnm02.png (88.44 KiB) Viewed 2756 times
nnm.zip
Updated script
(409 Bytes) Downloaded 137 times

User avatar
Instigater
Cacti User
Posts: 141
Joined: Mon Dec 13, 2004 5:14 pm
Location: Jurmala, Latvia

Re: Simple NNM > CACTI integration script

#6 Post by Instigater » Fri Feb 03, 2012 5:21 am

Better filtering support - now checks if filter can be satisfied from data source's cached name for asked host.
Attachments
nnm.zip
Better filtering support.
(507 Bytes) Downloaded 180 times

Post Reply