aloe event console add on

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

oharel
Cacti User
Posts: 84
Joined: Wed Jan 07, 2004 11:16 am

Post by oharel »

YES! :lol:
it is working now.
This is a result of the debug setting in either aloe-config.xml or ping-probe-config-template.xml or both. Can you make sure both of them are set to 0 (zero).
done. they are both on 0 - i think that is what did the trick.
I don't have access to anything RH, but if this doesn't solve it, i'll try and get my hands on a copy and load it up.
i had Cacti installed on a RH9 system, but moved it to Slackware9 before implementing Aloe, and probably got confused myself...
Sorry if this made your life harder :( - i had not noticed before you were os-type specific (only OS specific :) )

now, (nag, nag), do u have any such template for interface statistics? say i want aloe to tell me when traffic on an interface goes above a certain value - i have to have a script that turns the right rrds to xmls and then read the values from the xml, right?
is it possible to use part of your script - that part that creates the xmls out of rrds?
Rax, is anything like that planned for upcoming versions?

-harel
sidewinder
Cacti User
Posts: 66
Joined: Sat Dec 06, 2003 12:44 pm
Location: Winchester, MA

Post by sidewinder »

oharel wrote:YES! :lol:
it is working now. [/qoute]

Great!
This is a result of the debug setting in either aloe-config.xml or ping-probe-config-template.xml or both. Can you make sure both of them are set to 0 (zero).
done. they are both on 0 - i think that is what did the trick.
Maybe i'll have to add log to file option or something, sos not to confuse output buffers.
I don't have access to anything RH, but if this doesn't solve it, i'll try and get my hands on a copy and load it up. i had Cacti installed on a RH9 system, but moved it to Slackware9 before implementing Aloe, and probably got confused myself...
Sorry if this made your life harder :( - i had not noticed before you were os-type specific (only OS specific :) )
No, didn't make it harder, when i reach for a *nix OS, it's ususallly FreeBSD. Slackware, Redhat there all just as unfamilliar to me.
now, (nag, nag), do u have any such template for interface statistics? say i want aloe to tell me when traffic on an interface goes above a certain value - i have to have a script that turns the right rrds to xmls and then read the values from the xml, right?
is it possible to use part of your script - that part that creates the xmls out of rrds?
Something like this perhaps?

In it's script form, very tedious to implement, you have to add individual device interfaces, so depending on the number of interfaces you wish to monitor it can be a real hassle.

In it's indexed script form, the problem of adding individual intefaces goes away, but further modification to cacti is required. Primarily because the script returns multiple data outputs and the indexed script code in cacti needs to be modified to accept it. This way also suffers from script overhead and the pollers (cmd.php or cactid) ability to handle it. cactid (0.85a) has a problem threading scripts, so you have to run it in a single thread and cmd.php is single threaded. Again the number of interfaces can be a limiting factor.

Either way it still abit confusing to implement mostly because once you step out of the standard interface mib tree, every oid is different even among the same vendor. Plus with 0.8.6 due out soon, all of this will need to be cobbled into that code, so it may delay any move to that if you chose to implement it.
Rax, is anything like that planned for upcoming versions?

-harel
Attachments
int-health.jpg
int-health.jpg (71.08 KiB) Viewed 6765 times
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Oharel,

Yes, this feature is on the list. The list is already over 50 items long. This is one of the features that borders on event management and tabular display feature requests. We will have it integrated into the overall product, the issue is when.

We will first have to evaluate Phils design and then determine itegration methodology. I want to get this feature right and not have the design hit the wall as it grows in scope, so it may take some time.

If you are interested in helping us prioritize, send me an e-mail with your contact information and I will get the list to your for your prioritization. I can be reached at larryjadams@comcast.net.

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?
oharel
Cacti User
Posts: 84
Joined: Wed Jan 07, 2004 11:16 am

Post by oharel »

Something like this perhaps?
exactly!
In it's script form, very tedious to implement
i don't mind. i think it is worth the trouble. Plus i get to share incompatibilities :)
i would love to have that script with a short explanation of how to implement it.

thanks
-harel
sidewinder
Cacti User
Posts: 66
Joined: Sat Dec 06, 2003 12:44 pm
Location: Winchester, MA

Post by sidewinder »

In it's script form, very tedious to implement
i don't mind. i think it is worth the trouble. Plus i get to share incompatibilities :)
i would love to have that script with a short explanation of how to implement it.
Alright then, i will rebuild the script template and such and package up the files. Should have something for you in a day or so. I've made a few modifications to this since my original post, so there may be a new aloe-config.xml and ping-probe script too. (See if i was a programmer i would include a revision level in the stuff i write to make this easier.:))

What type of devices are you planning to poll? I've been focused on Cisco routers and switches because they are typically what i am dealing with.

-Phil
oharel
Cacti User
Posts: 84
Joined: Wed Jan 07, 2004 11:16 am

Post by oharel »

Hi Sidewinder,
cactid (0.85a) has a problem threading scripts, so you have to run it in a single thread and cmd.php is single threaded.
i am using cmd.php, but it appears to be terribly slow and perhaps that is the reason why some of my cpu and memory graphs for cisco devices stopped working. other graphs work fine. i thought about moving to cactid, but if that means i will not be able to use aloe, i will stay with the cmd.php and solve the problem.
as for the devices - yes, interfaces on Cisco switches and routers in the most part, so that is not a problem.
question:
will i be able to use the script you are creating and employ aloe with other data templates and graphs? i created a custom data template, polling a device with an OID and would like it to send me notifications when a baseline is reached... i noticed that this is a feature that might be installed in upcoming versions but i can't wait :)

thanks
-harel
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

O'Harel,

In the new version of Cacti 0.8.6, Sindwinder may easily migrate his code (nice if it were PHP based all the way... or even ANSI C). But we have migrated to launching poller.php. It then calls CACTID (Still some development going on there). Once polling is complete, Sindwinder takes over.

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?
sidewinder
Cacti User
Posts: 66
Joined: Sat Dec 06, 2003 12:44 pm
Location: Winchester, MA

Post by sidewinder »

i am using cmd.php, but it appears to be terribly slow and perhaps that is the reason why some of my cpu and memory graphs for cisco devices stopped working. other graphs work fine. i thought about moving to cactid, but if that means i will not be able to use aloe, i will stay with the cmd.php and solve the problem.
Nope you can use cactid, just need to make sure the thread count is set to 1 in the cactid.conf file. You should definately see a performace improvement.
as for the devices - yes, interfaces on Cisco switches and routers in the most part, so that is not a problem.
Great, It should still work other devices, but harder to provide any assistance should some be needed.
question:
will i be able to use the script you are creating and employ aloe with other data templates and graphs? i created a custom data template, polling a device with an OID and would like it to send me notifications when a baseline is reached... i noticed that this is a feature that might be installed in upcoming versions but i can't wait :)
Depends, all of the threshold checking is currently done in the script. Since this functionality does not exist currently in cacti, a script would be needed. I may be able to help you hack something up if you really need it.

And here it is, there is a readmetwice.txt file that hopefully offers some instruction. When you get to the inthealth.pl script, I would suggest you run it from the command line a few times with debug on to get familiar with it.

Cheers, Phil
Attachments
inthealth.zip
(23.53 KiB) Downloaded 418 times
oharel
Cacti User
Posts: 84
Joined: Wed Jan 07, 2004 11:16 am

Post by oharel »

thanks Sidewinder!

i will try it out in the next couple of days and let you know, as usual :)

-harel
oharel
Cacti User
Posts: 84
Joined: Wed Jan 07, 2004 11:16 am

Post by oharel »

Hi Phil,

read "readmetwice.txt" 'bout 10 times :)
implemented, debugged and configured.

ok, here goes:

1. when running the script, it creates two directories: 172.16.0.1/ and 172.16.0.1mycom/; the first one contains the xmls with the ifIndex, the second one contains int-health-172.16.0.1vipstot1..xml file
is that how it should be?

2. in the data template, under 2: ifErrorRate, 3: ifIn... and 4: ifOut... the output field is set in all of them to ifCollisionRate - CollisionRate
is that as it should be?

3. i added a device, created the graph, ans then continued to add graphs according to index. i guess that is what i have to do, right?

4. in Graph Management - Data Source [ifErrorRate] and Data Source [ifInUtilization] show "None" - should they not contain (ifErrorRate) and (ifInUtilization)? i added these, 'cause it seems logical, but i might be wrong.

5. my graphs seem to be created, but the rrds dont get updated, so i get NaN - what did i do wrong? i checked that in the Data Input Method i have the correct path, of-course (was for Windows, changed to Linux)

6. when clicking on a graph, i do not get to the "monitor health" page, like you pasted above, but a normal day - month - year page. am i missing an XML here somewhere?

7. last:
...if the device defined in cacti was 192.168.7.1 you would copy this file to aloe/config/int-health-192.168.7.1.xml
done that. effect? non that i can see. maybe because i am missing 6?

hope this gives you a pretty good idea of the mess i done :)

-harel
oharel
Cacti User
Posts: 84
Joined: Wed Jan 07, 2004 11:16 am

Post by oharel »

ok, one more thing i see:
in graph template i found: Item # 1 (None): Inbound Utilization and Item # 5 (None): Error Rate and likewise their GPRINTs.
i changed them to reflect what i think is the correct DataSource.
still, nothing changed.

-harel
sidewinder
Cacti User
Posts: 66
Joined: Sat Dec 06, 2003 12:44 pm
Location: Winchester, MA

Post by sidewinder »

oharel wrote:Hi Phil,

read "readmetwice.txt" 'bout 10 times :)
implemented, debugged and configured.

ok, here goes:
1. when running the script, it creates two directories: 172.16.0.1/ and 172.16.0.1mycom/; the first one contains the xmls with the ifIndex, the second one contains int-health-172.16.0.1vipstot1..xml file
is that how it should be?
This is kind of bizzare, what you should get is 1 directory 172.16.0.1/ with a file named int-health-172.16.0.1.[ifindex]

Then there should be a new file named int-health-172.16.0.1.[ifindex] for each interface you add. So

int-health-172.16.0.1.1
int-health-172.16.0.1.2
and so on

The script has a bad habbit of creating xml terds when it encounters things it doesn't expect so it could be the result of you trying it out. I would sugest you just delete them, they will get re-generated when the script runs again. There are some other problems that need to be corrected 1st.

2. in the data template, under 2: ifErrorRate, 3: ifIn... and 4: ifOut... the output field is set in all of them to ifCollisionRate - CollisionRate
is that as it should be?
Nope, they should match up to the script output, so the output field of ifErrorRate should be ifErrorRate, ifInputUtilization should be ifInUtilization, etc. You should be able to change them with the output field dropdown in the aloe Interface - Health data template. After you've done that, find the datasources associated with aloe Interface Health and delete them + the graphs they are associated with.
3. i added a device, created the graph, ans then continued to add graphs according to index. i guess that is what i have to do, right?
Yup, that would be right. I would suggest you add just one until it is working properly. Easier to troubleshoot.
4. in Graph Management - Data Source [ifErrorRate] and Data Source [ifInUtilization] show "None" - should they not contain (ifErrorRate) and (ifInUtilization)? i added these, 'cause it seems logical, but i might be wrong.
That is correct, looks like you've corrected the Graph Template already.
5. my graphs seem to be created, but the rrds dont get updated, so i get NaN - what did i do wrong? i checked that in the Data Input Method i have the correct path, of-course (was for Windows, changed to Linux)
You've done nothing wrong, from the explanation of it, the template did not get imported properly.
6. when clicking on a graph, i do not get to the "monitor health" page, like you pasted above, but a normal day - month - year page. am i missing an XML here somewhere?
That sounds like the script is not outputing the xml file in the right place or with the right name. Could be a result of a few things.
7. last:
...if the device defined in cacti was 192.168.7.1 you would copy this file to aloe/config/int-health-192.168.7.1.xml
done that. effect? non that i can see. maybe because i am missing 6?
In this case it looks like the host you are polling is 172.16.0.1, so you would copy this file to aloe/config/int-health-172.16.0.1.xml

hope this gives you a pretty good idea of the mess i done :)

-harel
No mess you've done. Looks like a couple of things didn't happen correctly so you definately had some help :)

So lets the data and graph templates straightened out so the script output can be processed by cacti, then we can move on to any remaining problems. Lots of moving parts as i like to say. What would also be useful is the output from the script run from the command line

Cheers, Phil
oharel
Cacti User
Posts: 84
Joined: Wed Jan 07, 2004 11:16 am

Post by oharel »

Hi Phil,
before any other answer (which i will try to answer during the weekend), output of the script:
root@dublin:/var/www/htdocs/cacti/scripts# perl inthealth.pl 172.16.0.1 mycom 1 query
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 16
17 17
18 18
19 19
21 21
23 23
24 24
if i do ifAlias, i gteh th description of the interface.
comes to think of the bad import remark, i did get some "dependencies not met" after importing. wanna know which? u dont have a choice:
Data Template
[success] aloe Interface - Health [update]
+ Found Dependency: (Data Input Method) aloe Interface Health
+ Unmet Dependency: (Data Input Field)
+ Found Dependency: (Data Input Field) Collision Rate
+ Unmet Dependency: (Data Input Field)
+ Found Dependency: (Data Input Field) Interface Index

Graph Template
[success] aloe Interface - Health [update]
+ Unmet Dependency: (Data Template Item)
+ Found Dependency: (GPRINT Preset) Normal
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)

+ Found Dependency: (Data Template Item) ifOutUtilization
+ Found Dependency: (CDEF) Make Stack Negative
+ Found Dependency: (Data Template Item) ifCollisionRate

seems like those parts that were missing in the data template or graph template, which i added later.

i will get you answers about the rest later.
thanks.

--harel
oharel
Cacti User
Posts: 84
Joined: Wed Jan 07, 2004 11:16 am

Post by oharel »

Hi Phil,

I deleted all previously made devices, graphs and data-sources for these devices, and started from the beginning by re-importing the XML and fixing it by adding the missing parts.
This is kind of bizzare, what you should get is 1 directory 172.16.0.1/ with a file named int-health-172.16.0.1.[ifindex]
Then there should be a new file named int-health-172.16.0.1.[ifindex] for each interface you add. So int-health-172.16.0.1.1 (...)
yes, i am having this directory created, and it has index-xml files created in them. only i also have 172.16.0.1mycom/int-health-172.16.01mycom1..xml created. the file contains, among other stuff:

Code: Select all

                <ifScript>
                        <name>Script used to generate this file</name>
                        <oid>/var/www/htdocs/cacti/scripts/inthealth.pl 172.16.01mycom1 get 1  </oid>
                        <value></value>
                </ifScript>
and then the OIDs...
In this case it looks like the host you are polling is 172.16.0.1, so you would copy this file to aloe/config/int-health-172.16.0.1.xml
actually, done on the first occasion, but done again now, after starting from the beginning.
That sounds like the script is not outputing the xml file in the right place or with the right name. Could be a result of a few things.
and these are...? :wink:

the main problem is that my rrds are still not getting updated. the int-health page seen when clicking on the graph (or not seen in my case) is the second step, i think.

--harel
sidewinder
Cacti User
Posts: 66
Joined: Sat Dec 06, 2003 12:44 pm
Location: Winchester, MA

Post by sidewinder »

oharel wrote:Hi Phil,

I deleted all previously made devices, graphs and data-sources for these devices, and started from the beginning by re-importing the XML and fixing it by adding the missing parts.
Great.
yes, i am having this directory created, and it has index-xml files created in them. only i also have 172.16.0.1mycom/int-health-172.16.01mycom1..xml created. the file contains, among other stuff:

Code: Select all

                <ifScript>
                        <name>Script used to generate this file</name>
                        <oid>/var/www/htdocs/cacti/scripts/inthealth.pl 172.16.01mycom1 get 1  </oid>
                        <value></value>
                </ifScript>
and then the OIDs...
This looks like the input string on the aloe Interface Health data input method is missing some spaces.

It should look like this

<path_cacti>/scripts/inthealth.pl <hostname> <community> <version> get <ifIndex>

from this output it looks like there is a space missing between hostname
and community and between community and version:

/var/www/htdocs/cacti/scripts/inthealth.pl 172.16.01mycom1 get 1

Can you double check that and correct if need be.
the main problem is that my rrds are still not getting updated. the int-health page seen when clicking on the graph (or not seen in my case) is the second step, i think.

That's because the script is not running right yet :wink: .

Can you make sure debug is set to 1 in aloe-config.xml and run this from the shell?

/var/www/htdocs/cacti/scripts/inthealth.pl 172.16.01 mycom1 get 1

That should provide some more information to go on.

-Phil
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest