Data Input Method Script runs multiple times
Moderators: Developers, Moderators
-
- Posts: 4
- Joined: Wed Mar 07, 2007 5:38 pm
Data Input Method Script runs multiple times
Hello.
I created a Data Input Method that executes a short perl script. The output is:
Breaker_1:1.2 Breaker_2:3.4........ This continues up to Breaker_84.
I have a Data Input Method and created output fields for each expected output.
Breaker_1 has a Field output of Breaker_1
I created a data source for each of the DIM's with the output name in the box Data source Item equal to that of the DIM.
I then created a graph for each data source.
Each time the poller runs it appears to execute the sctipt to gater the breaker values rather than use the expected output values.
Any ideas ??
Cacti Version 0.8.6j
Sun Solaris 10
[/img]
I created a Data Input Method that executes a short perl script. The output is:
Breaker_1:1.2 Breaker_2:3.4........ This continues up to Breaker_84.
I have a Data Input Method and created output fields for each expected output.
Breaker_1 has a Field output of Breaker_1
I created a data source for each of the DIM's with the output name in the box Data source Item equal to that of the DIM.
I then created a graph for each data source.
Each time the poller runs it appears to execute the sctipt to gater the breaker values rather than use the expected output values.
Any ideas ??
Cacti Version 0.8.6j
Sun Solaris 10
[/img]
- Attachments
-
- 1.JPG (108.11 KiB) Viewed 1500 times
-
- 2.JPG (86.42 KiB) Viewed 1500 times
-
- 3.JPG (128.09 KiB) Viewed 1500 times
-
- 4.JPG (197.01 KiB) Viewed 1500 times
-
- 5.JPG (192.05 KiB) Viewed 1500 times
I suggest you read over this on how to set up a script template in cacti: http://docs.cacti.net/node/200
Looks like you're script is running multiple times for the same device for each Data Source. Very inefficient.
Looks like you're script is running multiple times for the same device for each Data Source. Very inefficient.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 4
- Joined: Wed Mar 07, 2007 5:38 pm
Thanks for the reply.
The results of the script come from one host (device) only. This is a power monitoring device connected to our circuit breaker box (84 breakers in all).
The sctipt gets the raw log a parses out the info looking for the amp values then returns Breaker_1:<Value> Breaker_2:<Value>......Breaker_n:<Value>
I used the example in the manual (http://www.cacti.net/downloads/docs/htm ... graph.html)
as a guide. The example script only returns one value... my script returns 84.... what am I missing ?...
also I did not see anything regards script template in the docs.
The results of the script come from one host (device) only. This is a power monitoring device connected to our circuit breaker box (84 breakers in all).
The sctipt gets the raw log a parses out the info looking for the amp values then returns Breaker_1:<Value> Breaker_2:<Value>......Breaker_n:<Value>
I used the example in the manual (http://www.cacti.net/downloads/docs/htm ... graph.html)
as a guide. The example script only returns one value... my script returns 84.... what am I missing ?...
also I did not see anything regards script template in the docs.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
I assume, that your script spits out all 84 values for each call. And I assume, that you decided to graph only one breaker per graph, that is: you have 84 graphs, each for one breaker.
By creating each of this graphs, cacti associates the script with each of them. By doing so, cacti adds a new call to the script and creates a new rrd file (each holding data for all 84 breakers) for each one. Obviously, this yields a big overhead.
I recommend deleting 83 graphs along with their datasources first.
To avoid this, only create the first graph as usual (the one you've left when deleting unwanted stuff). Please create the other one's from Graph Management by adding a new Graph here, referring to the Host and to your Graph Template. As a data source item, please select one of those already existing at the first rrd file created (you will be provided with a dropdown select box).
Reinhard
By creating each of this graphs, cacti associates the script with each of them. By doing so, cacti adds a new call to the script and creates a new rrd file (each holding data for all 84 breakers) for each one. Obviously, this yields a big overhead.
I recommend deleting 83 graphs along with their datasources first.
To avoid this, only create the first graph as usual (the one you've left when deleting unwanted stuff). Please create the other one's from Graph Management by adding a new Graph here, referring to the Host and to your Graph Template. As a data source item, please select one of those already existing at the first rrd file created (you will be provided with a dropdown select box).
Reinhard
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Perhaps the better link would be http://docs.cacti.net/node/343, but this one is not finished. If you read the first link AND this one, this should do for most usersBSOD2600 wrote:I suggest you read over this on how to set up a script template in cacti: http://docs.cacti.net/node/200
Looks like you're script is running multiple times for the same device for each Data Source. Very inefficient.
Reinhard
-
- Posts: 4
- Joined: Wed Mar 07, 2007 5:38 pm
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
When defining a Data Template, you'll have to select the DATA INPUT METHOD (upper half of the page). SAVE. Then, when defining a data source item, there's a dropdown that allows selecting one of the "Output Items" defined. That's for the Templates.
Using the method from above, you will have to create a Graph on your own, referencing your Graph Template and the host. If in doubt where to fill in what, please post a screenshot of this page
Reinhard
Using the method from above, you will have to create a Graph on your own, referencing your Graph Template and the host. If in doubt where to fill in what, please post a screenshot of this page
Reinhard
Who is online
Users browsing this forum: No registered users and 3 guests