General configuration of cacti

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

Moderators: Developers, Moderators

User avatar
IMurDOOM
Posts: 24
Joined: Mon Oct 31, 2005 4:17 am
Location: Germany ^^
Contact:

General configuration of cacti

Post by IMurDOOM »

Hi there,

im german so please excuse my bad english ; )

I have a big problem, searched here in the forum mit not
found the answers for a noob like me. Just little pieces.

I have a .pl file uses the randome.rrd. If i execute that,
theres just a line goes up to 300 in about 12 Hours.
I will combine that with ServerLogfiles in the future. But that doesn't
matter i think. My Problem is, to link the pl file with the
cacti frontend.

I read a lot about SNMP, 2 days later, i recognized that i don't need
that so, wasted time.

And now i want you to help me, to configure the cacti, if u don't mind.
I really have problems with this, i can't get my head around that.
All of the Data Sources an Graphic Templates, what of these thinks
are important to me in my case?

Description of my ???doings??? <- don't know if that is right ;)
I have created a graph, i would convert it to use it afterwards for
my graphics for the logs. After that, i created a new graphic.
Uses the Template i created.

erm, now i created a Data Source. What Data Input Method should
i choose?

I thought Get Script Data can be good.

and what Data Source Type?
GAUGE? COUNTER?

After that, i converted it, as the graphic template and made a new
Data Source with the Template, works with the RRD File i typed in.
In this case randome.rrd.

That's what i have reached in one week -_- just tried again and again.
But where can i put the PL file in?
In the graph monitor there's just the description and no graphic.



I don't know what to do, I need help, please. :cry: :cry: :cry:

IMurDOOM
Last edited by IMurDOOM on Mon Nov 07, 2005 7:40 am, edited 6 times in total.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

We have several active germanic users, so you might even be able to get support in German. You need to do some reading first on RRD. Goto:

http://www.rrdtool.org

Then, you need to understand SNMP. For that I used the famous Google tool. The main commands you need to know about are:

snmpget
snmpwalk
snmpbulkwalk

You also need to know what purpose MIB files provide. They provide translation from the numeric format of an object to it's text name.

Lastly, you need to know how to configure Cacti. There is a pretty good manual right here in the cacti.net site. Good luck!!

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?
User avatar
joed
Posts: 29
Joined: Mon Sep 19, 2005 6:27 am
Location: Germany/Palatinate

Post by joed »

schreib mir ne Mail ;-)

send me an email :-)
User avatar
IMurDOOM
Posts: 24
Joined: Mon Oct 31, 2005 4:17 am
Location: Germany ^^
Contact:

Post by IMurDOOM »

Thanks for your replys, both.

Joeb, i wrote you an email.

But whether i have the logs on my computer as TXT
files, why do i need the snmp?
My examples included in the RRD are working and creates
an image with a line, my problem is the visualisati9on of this
PERL script.

I will look @ that you wrote. Thanks, thanks, thanks.
I have been rescued from hell ;)

IMurDOOM
User avatar
IMurDOOM
Posts: 24
Joined: Mon Oct 31, 2005 4:17 am
Location: Germany ^^
Contact:

Post by IMurDOOM »

My last question for the next few hours/days ;D

I heard again that i have to use SNMP, is there a way
to leave that outside?

The Logfiles are local on myy PC. So i just have cacti
to exec the perl skript and inserting the outputs.

For example:

The Logfile has the MBytes traffic for one minute in one row.

Code: Select all

12:01 2 Mb
12:02 0 Mb
12:03 1,5 Mb
The Perl Skript will read that and have to give it to cacti.
just isolate the Mbs first case "2" and then send it to cacti which
is on the same PC!
Cacti has to insert the infos.
No more.

And my question: Why do i have to use SNMP for this? Does cacti just
listen on the SNMP Ports and i have to send it with Perl via SNMP?
Theres no other way to reach the same result? <- Don't know if that's right ;D

Thanks for ur help again.

EDIT: I have a graphic already. That works but the Database is empty.
So, we solved the problem with the graphics. And i have read the html
doc as well.

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

Post by gandalf »

IMurDOOM wrote:I heard again that i have to use SNMP, is there a way
to leave that outside?
As long as you're only reading data from your local host, there's no need for snmp. But when it comes to read data from a remote host, you have to introduce some "transport method" for the readings. Networkers usually take SNMP, as this already provides lots of data. For custom scripts, you may as well use http, telnet, ssh but you have to do some coding.
To parse your log, you'll have to have some script (sh/perl/php or the like) that simply prints your value, see http://www.cacti.net/downloads/docs/htm ... thods.html for details. It is possible to print not only a single value.
You'll define a Data Input Method that relates to that script (e.g. provides input/output parms). Then a Data Template is needed, that one will define string the data in rrd files. Last, a Graph Template will define the properties of the graph for your data. You'll find all of this in the docs (see link).
Reinhard
User avatar
IMurDOOM
Posts: 24
Joined: Mon Oct 31, 2005 4:17 am
Location: Germany ^^
Contact:

Post by IMurDOOM »

Yeah thanks a lot,
i was right with no need of SNMP :) that makes me happy because
i tried 2 days with that and it won't work ^^
The data will be transfered over FTP or sth like that.

The first problem is not the transport of the logfile, but, as i said, the
filling of the databse because i dont get along with the arguments
given from the script to cacti.

I read that, and for a noob who never saw sth like this program
before its a torture. Normaly i wrote my programs for myself and
know how to use them ;D

In my input method there is the input string:
/home/IMurDOOM/sources/my.pl <variable1>

the my.pl:

Code: Select all

#!usr/bin/perl

print "variable1: "+rand(100);
that is nearly that, described in the manuel. Or that way, i understood that.
Hope that is right.

Last thing to config are the input fields and output fields. I confed them
with the help.

But there must be an error somewhere. The DB is empty

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

Post by gandalf »

IMurDOOM wrote:Yeah thanks a lot,
i was right with no need of SNMP that makes me happy because
i tried 2 days with that and it won't work ^^
The data will be transfered over FTP or sth like that.
Well, for this time this may be well done. But if you want to get data every 5 Minutes, ftp-ing them sounds a bit ugly for me. Review the features of net-snmp (pass or exec option), but not yet.
In my input method there is the input string:
/home/IMurDOOM/sources/my.pl <variable1>

the my.pl:

Code: Select all

#!usr/bin/perl

print "variable1: "+rand(100);
Well done, so far. <variable1> seems to be an output var, no input var present. Am I right? Well, and a mistake is in there: Please NO blanks between variable name and value!
But there must be an error somewhere. The DB is empty
Please post a screenshot of your Data Input Method or describe what you did to build this.
We'll get it, for sure!
Reinhard
User avatar
IMurDOOM
Posts: 24
Joined: Mon Oct 31, 2005 4:17 am
Location: Germany ^^
Contact:

Post by IMurDOOM »

Thanks thank,

My Data Input Method:
Name: Data Input Method Template
Input Type: Script/Command
Input String: /root/Desktop/sources/my.pl <var1>
(The root mode will be changed if i install it on another PC)

Input Variables:
Name: var1
Field order: 1
Friendly Name: Input_Script_Data
No Regular expression math
Allow Empty Input = false
Special Type Code = nothing

Output fields
Field [Output]: var1
Friendly Name: Output_Script_Data
Update RRD File: False

Hope that helps you ;)

IMurDOOM
User avatar
IMurDOOM
Posts: 24
Joined: Mon Oct 31, 2005 4:17 am
Location: Germany ^^
Contact:

Post by IMurDOOM »

here i am again, i have just read this example:
http://www.cacti.net/downloads/docs/htm ... graph.html

It describes that, what i want to do.
I works BUT (^^) rrd says, the rrdfile in my case localhost_random_numbers.rrd or sth like that does not exist.
How can i use cacti to create this rrd? I heard that cacti can do this.
After that, it should work. I can't use another rrd file, theres just
a text sayin permissions denied.

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

Post by gandalf »

I'd like to give the output var not the same name as the input var. Don't know whether this works with cacti; just for clarity.
As to the permissions: You did modify the crontab to implement the 5 min polling using a special "cactiuser". Did you change the ownership of <path_cacti>/log and ./rra/ to this user as described in the installation steps?
To verify this one, please "su - cactiuser" and run the poller from here: "php /some/path/to/cacti/poller.php". Look for permission errors.
Reinhard
User avatar
IMurDOOM
Posts: 24
Joined: Mon Oct 31, 2005 4:17 am
Location: Germany ^^
Contact:

Post by IMurDOOM »

here are some screenshots of the configuration
Attachments
Data Source
Data Source
datasource.jpg (110.47 KiB) Viewed 4167 times
graph.jpg
graph.jpg (229.33 KiB) Viewed 4167 times
inputmethod.jpg
inputmethod.jpg (52.65 KiB) Viewed 4167 times
User avatar
IMurDOOM
Posts: 24
Joined: Mon Oct 31, 2005 4:17 am
Location: Germany ^^
Contact:

Post by IMurDOOM »

an the last 2 ones
Attachments
item1.jpg
item1.jpg (80.31 KiB) Viewed 4166 times
pollersettings.jpg
pollersettings.jpg (119.16 KiB) Viewed 4166 times
User avatar
IMurDOOM
Posts: 24
Joined: Mon Oct 31, 2005 4:17 am
Location: Germany ^^
Contact:

Post by IMurDOOM »

AND: I looked @ the device again.
Under the point devices the status of my server is unknown.
Is there any link to my problem?

By the way: I'm using Suse 10.0

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

Post by gandalf »

There is a Downed Host Detection. If that fails, cacti will not even try to get values from that host. Activate DEBUG logging level and have a look at <path_cacti>/log/cacti.log for that error. You will even see the cacti poller executing your script, if and only if Host Detection shows the host is up! And you will see the value fetched from that script as well as the rrdtool update.
To deactive Host Detection, please clear the SNMP Community String for that very host (see Device for that).
Reinhard
Post Reply

Who is online

Users browsing this forum: takeatr1p and 0 guests