Chapter 13. How To
I've not put a lot of explanations in the procedures. Refer to the Cacti manual for more details.
Have a tested script ready to go. I used the following script located in
/home/cactiuser/bin
called
random2.pl
:
#!/usr/bin/perl  w
print int(rand(10));
This script simply prints out a random integer between 0 and 9 every time it's called.
The minimal steps to create a graph from a script are simply:
1. Create a Data Input Method to tell Cacti how to call the script and what to expect from it.
2. Create a Data Source to tell cacti how and where the data will be stored.
3. Create a Graph to tell cacti how the data will be presented in graph form.
4. Add Graph to Graph View so you can view the graph.
5. View the Graph
The details are below:
1. Create Data Input Method
Click the Console tab at the top
Click Data Input Methods under Management
Click Add
Name: Random 2 Input
Input Type: Script/Command
Input String: /home/cactiuser/bin/random2.pl
Click Create
Should see "Save Successful." at the top of the page.
Click Add by Output Fields (there are no input fields for this example)
Field [Output]: random_number
Friendly Name: Random Number
Update RRD File: checked
Click Create
Should see "Save Successful." and random_number listed under Output Fields.
Click Save
Should see "Save Successful." and Random Input listed in Data Input Methods.
2. Create a Data Source
Click Data Sources under Management
Click Add in the top right
The Data Template Section should be None and None, we're not using templates for this example.
Click Create.
Name: random2ds
Data Source Path: blank (Cacti will fill this in)
Data Input Source: Random 2 Input (this is the data input method you created in step 1)
Highlight each of the Associated RRA's using control click
Step: 300 (300 seconds = 5 minutes)
Data Source Active: checked
Describe the Data Source Item inside the RRA by...
Internal Data Source Name: random_number
Minimum Value: 0
31
<





New Page 1








Home : About Us : Network : Services : Support : FAQ : Control Panel : Order Online : Sitemap : Contact : Terms Of Service

 

Our web partners:  Jsp Web Hosting  Unlimited Web Hosting  Cheapest Web Hosting  Java Web Hosting  Web Templates  Best Web Templates  Web Design Templates  Interland Web Hosting  Cheap Web Hosting  Filemaker Web Hosting  Tomcat Web Hosting  Quality Web Hosting  Best Web Hosting  Mac Web Hosting

 
 

Virtualwebstudio. Business web hosting division of Vision Web Hosting Inc. All rights reserved

Php Mysql Web Hosting