Howto install cacti from sources?

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

frop

Howto install cacti from sources?

Post by frop »

hallo
I'm using a "chrooted" apache (1.3.xx), with static PHP5.0.2.
Now, i wish to install cacti and takes stats from my webserver&line.
The point is that i can't find a proper HOWTO to do this from sources.
Someone can help me?

frop
Guest

Post by Guest »

ok...solved about all...
now, all is working...but i've a question...
Do i need an snmp daemon running for fetching values?

another thing...it seem to me that i need also a perl interpreter for using perl script...should mod_perl sufficient for this purpose?

P.S.
sorry for "stupid" questions...
Guest

Post by Guest »

mmm...really, all is working apart this:

note that i've only net-snmp library installed, and i've copied the snmp.conf from some README...
ERROR: Could not open config file
CACTID: Using cactid config file [/etc/cactid.conf]
CACTID: Version 0.8.6c starting
No log handling enabled - turning on stderr logging
/etc/snmp/snmp.conf: line 2: Warning: Unknown token: syslocation.
/etc/snmp/snmp.conf: line 3: Warning: Unknown token: syscontact.
/etc/snmp/snmp.conf: line 6: Warning: Unknown token: rocommunity.
/etc/snmp/snmp.conf: line 9: Warning: Unknown token: disk.
CACTID: Execution Time: 1.2192 s, Threads: 1, Hosts: 1
and this (there's no perl interpreter at this point):
11/18/2004 02:19:38 AM - CACTID: Poller[0] Host[1] ERROR: Empty result [127.0.0.1]: 'perl /webhomes/cacti.rizla.org/scripts/loadavg_multi.pl'
11/18/2004 02:19:38 AM - CACTID: Poller[0] Host[1] WARNING: Result from SCRIPT not valid. Partial Result: U...
11/18/2004 02:19:38 AM - CACTID: Poller[0] Host[1] ERROR: Empty result [127.0.0.1]: 'perl /webhomes/cacti.rizla.org/scripts/linux_memory.pl MemFree:'
11/18/2004 02:19:38 AM - CACTID: Poller[0] Host[1] WARNING: Result from SCRIPT not valid. Partial Result: U...
11/18/2004 02:19:38 AM - CACTID: Poller[0] Host[1] ERROR: Empty result [127.0.0.1]: 'perl /webhomes/cacti.rizla.org/scripts/linux_memory.pl SwapFree:'
11/18/2004 02:19:38 AM - CACTID: Poller[0] Host[1] WARNING: Result from SCRIPT not valid. Partial Result: U...
11/18/2004 02:19:38 AM - CACTID: Poller[0] Host[1] ERROR: Empty result [127.0.0.1]: 'perl /webhomes/cacti.rizla.org/scripts/unix_processes.pl'
11/18/2004 02:19:38 AM - CACTID: Poller[0] Host[1] WARNING: Result from SCRIPT not valid. Partial Result: U...
11/18/2004 02:19:38 AM - CACTID: Poller[0] Host[1] ERROR: Empty result [127.0.0.1]: 'perl /webhomes/cacti.rizla.org/scripts/unix_users.pl'
11/18/2004 02:19:38 AM - CACTID: Poller[0] Host[1] WARNING: Result from SCRIPT not valid. Partial Result: U...
should mod_perl enought to use these perl script?
so? someone can tell me hot to procede from here?
m_o_d
Posts: 15
Joined: Wed Nov 17, 2004 9:22 pm

Post by m_o_d »

I have apache in chroot can you write howto about instaling cacti in chroot ?

Thenks
Guest

Post by Guest »

sure i cuold...btw, right now cacti doesn't graph anything...
I think my problem is lack of a perl interpreter...but i'm not sure...
When i'll have cacti working...surely...i can write it...
Guest

Post by Guest »

here's the problem

Code: Select all

11/19/2004 11:41:03 AM - CACTID: Poller[0] Host[1] ERROR: Empty result [127.0.0.1]: 'perl /webhomes/cacti.rizla.org/scripts/loadavg_multi.pl'
11/19/2004 11:41:03 AM - CACTID: Poller[0] Host[1] WARNING: Result from SCRIPT not valid. Partial Result: U...
11/19/2004 11:41:03 AM - CACTID: Poller[0] Host[1] ERROR: Empty result [127.0.0.1]: 'perl /webhomes/cacti/scripts/linux_memory.pl MemFree:'
11/19/2004 11:41:03 AM - CACTID: Poller[0] Host[1] WARNING: Result from SCRIPT not valid. Partial Result: U...
11/19/2004 11:41:03 AM - CACTID: Poller[0] Host[1] ERROR: Empty result [127.0.0.1]: 'perl /webhomes/cacti/scripts/linux_memory.pl SwapFree:'
11/19/2004 11:41:03 AM - CACTID: Poller[0] Host[1] WARNING: Result from SCRIPT not valid. Partial Result: U...
11/19/2004 11:41:03 AM - CACTID: Poller[0] Host[1] ERROR: Empty result [127.0.0.1]: 'perl /webhomes/cacti/scripts/unix_processes.pl'
11/19/2004 11:41:03 AM - CACTID: Poller[0] Host[1] WARNING: Result from SCRIPT not valid. Partial Result: U...
11/19/2004 11:41:03 AM - CACTID: Poller[0] Host[1] ERROR: Empty result [127.0.0.1]: 'perl /webhomes/cacti/scripts/unix_users.pl'
11/19/2004 11:41:03 AM - CACTID: Poller[0] Host[1] WARNING: Result from SCRIPT not valid. Partial Result: U...
i can't procede from here...
m_o_d
Posts: 15
Joined: Wed Nov 17, 2004 9:22 pm

Post by m_o_d »

that script works if you run:

Code: Select all

chroot /chroot/root/dir 'perl /webhomes/cacti.rizla.org/scripts/loadavg_multi.pl' ?
if not strace will help
Guest

Post by Guest »

sure...it seem to work...
it gave me no error, but also no result...it return me the prompt
Guest

Post by Guest »

nonon
i've used it without ' or "...something like:

Code: Select all

 # chroot /base/chroot /usr/bin/perl /webhomes/cacti/scripts/loadavg_multi.pl
1min: 5min: 10min:
so...it return something...
m_o_d
Posts: 15
Joined: Wed Nov 17, 2004 9:22 pm

Post by m_o_d »

works that? :

Code: Select all

chroot /base/chroot /webhomes/cacti/scripts/loadavg_multi.pl
(must have exec )
Guest

Post by Guest »

no...the last doesn't work...i need it?
m_o_d
Posts: 15
Joined: Wed Nov 17, 2004 9:22 pm

Post by m_o_d »

i'm not dev but if you create good chroot env... i think that cacti will work fine

Code: Select all

chroot /base/chroot /usr/bin/perl /webhomes/cacti/scripts/loadavg_multi.pl 
1min: 5min: 10min: 
you tell that works fine, perl is in chroot but loadavg_multi.pl ?

that what i write i think is run in chroot

What you think ?
frop

Post by frop »

ok...i think that the problems are in the scripts used....
now i'm thinking to keep cactid and various scripts out of the chroot...
but i don't know if it'll works.

Does cacti/rrdtool reads various data only from mysql?
Does cactid need something from "cacti dir" other than scripts?
maybe it's not so easy...as i don't know well how cacti/cactid/rrdtool menage data read/write and graphs menagement...i've to make some tries...
Guest

Post by Guest »

m_o_d you are right...but you'll need a lot of things in chroot...
perl scripts are based on standard GNU utilities, like "who", "ps", "uptime" etc...and also on "/proc" fs...
...so, you need all of them in the chroot to permit cactid/poller/scripts to work well...
But i don't think that is a good idea to pull all of that in your chroot...
...so we'll need a way to populate mysql cacti db from "out" of chroot, and make graph from "in" the chroot with rrdtool...don't know if it's possible...
m_o_d
Posts: 15
Joined: Wed Nov 17, 2004 9:22 pm

Post by m_o_d »

it's possible
you only need use cacti 0.8.6 where is poller script
in normal system you will crate cronjob

Code: Select all

*/5 * * * * php /chroot/env/dir/webhomes/cacti.rizla.org/poller.php
that script will be run in normal system where you have all bin what you need

And site will be run in chroot env where you don't need bin(i don't know about rrdtool)

Ps if it will work tell me :P
Last edited by m_o_d on Sat Nov 20, 2004 2:06 pm, edited 1 time in total.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests