Put text output from script on a Cacti page?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
audio
Posts: 7
Joined: Sat Jul 04, 2009 1:36 pm

Put text output from script on a Cacti page?

Post by audio »

Hello everyone, I'm new to Cacti and was wondering if this was possible... Since not all data is best represented as a graph, is it possible to add normal text output from a script to a Cacti page to supplement graphs? For example, say you're monitoring web server, could you create various top 10 lists such as:

1.) The most recently added binaries to the web root or system32 folder.

2.) The most recent *.exe files your server downloaded.

3.) Information on the top 10 IPs that are causing 400 or 500 server errors.

4.) Details of the most recent top 10 biggest outbound network flows your server had made.

5.) Details on the most recent outbound connects your server made to foreign countries.

I'd like to see that kind of information as text using Cacti. Is that possible?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Do you have something that collates that information already? Or are you really asking for that too? (and not just how to display it in Cacti)

If you already have it, then something like either Superlinks or notices might help you.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
audio
Posts: 7
Joined: Sat Jul 04, 2009 1:36 pm

Post by audio »

I've been programming with Perl for six or so months now and am fairly confident I could get the information to Cacti by parsing logs, through WMI, or using something like Log Parser. So yeah, I guess I'm just looking for something to display it in Cacti. I'm checking out Superlinks now which seems pretty cool. Thanks!
audio
Posts: 7
Joined: Sat Jul 04, 2009 1:36 pm

Post by audio »

I was reading the documentation and it appears as though Cacti is fairly picky about what data the script returns. For example it has to be in a name:value format. How would I be able to get Cacti to understand a script that returned a list of something such as the running processes?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

audio wrote:I was reading the documentation and it appears as though Cacti is fairly picky about what data the script returns. For example it has to be in a name:value format. How would I be able to get Cacti to understand a script that returned a list of something such as the running processes?
I'd suggest just grabbing the info with a script outside of Cacti, storing it somewhere else (e.g. a new table in the database, or a text file per host), and then linking *that* into Cacti (for example, by stuffing it into the notes field for the host, or with notices/superlinks). That way, Cacti doesn't need to understand it. Cacti is expecting numbers, not lists.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
audio
Posts: 7
Joined: Sat Jul 04, 2009 1:36 pm

Post by audio »

Good thinking, I'm pretty sure I can do that. Thanks for your help, Howie!
audio
Posts: 7
Joined: Sat Jul 04, 2009 1:36 pm

Post by audio »

I think this is the last question, I'm not a web developer by any means though, so the answer might be obvious. I just found out about Catalyst + Perl and am starting to like it.

Would there be anything preventing someone from inserting new tables into Cacti's database. Tables that contain other info such as running processes, network connections, user accounts, some logs, etc. Then using Perl + Catalyst develop web pages in the same web root folder as Cacti that display that additional information from the database? Basically have a new tab on Cacti's page that enables Cacti to display more than just graphs?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Adding new tables isn't too much of a problem - that's what many plugins do. but you should probably use some kind of prefix for all your table names (like your initials or app name) to avoid name collisions.

I think you might find it quite a challemge to integrate your peel/catalyst bit into cacti though. You'll need at least a little php too, to get the authentication etc to work...
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
audio
Posts: 7
Joined: Sat Jul 04, 2009 1:36 pm

Post by audio »

That sounds harder than I was hoping for. Is there any way around having to learn PHP? For example, if I had http:://webserver/cacti and http:://webserver/my_perl_app, with /my_perl_app, having authentication created in Perl + Catalyst and /cacti having it's own authentication? Basically two different sites using the same database on one web server?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

oh sure you can do that... I thought you
meant for it to be more part of cacti than that. So make it as a seperate ste, and then if you wanted to, superlinks can present it as a tab within cacti.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
audio
Posts: 7
Joined: Sat Jul 04, 2009 1:36 pm

Post by audio »

That's awsome! I have a lot of learning to do now. Thanks for putting up with all my questions. :)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests