[Apan-users] apan-sql questions/problems.
jeff vier
jeff.vier at tradingtechnologies.com
Tue Apr 13 18:12:06 CEST 2004
On Tue, 2004-04-13 at 10:44, Boulytchev, Vasiliy wrote:
> I made sure nagios.nagios is the owner, and that nagios can
> write/read/append the file.... Is that enough? I suppose it has to be
> permissions somewhere along the line......
Mine are 660 nagios.nagios, however, my apache user is also in the
nagios group (though I don't *think* that would make any difference
here).
I have never used the apanconf-sql tool, so I don't know how it does
things, but create my load rrds with:
/usr/local/rrdtool/bin/rrdtool create
/usr/local/nagios/rrd/server1_CPULoad.rrd -s 300
DS:CPU-Load:GAUGE:900:0:U RRA:AVERAGE:0.5:1:50400
RRA:AVERAGE:0.5:60:43800
and, into MySQL, I do:
echo "INSERT INTO apanservices VALUES ('','server1','CPU
Load','/usr/local/nagios/rrd/server1_CPULoad.rrd','CPU Load - with
historic graph','load/%','','','','');" | mysql -A -h mysqlserver -u
nagios --password=blahblah -P 3306 nagios -H
NEWIDX=$(echo "select idx from apanservices where host='server1' and
service='CPU Load';"|mysql -A -h mysqlserver -u nagios
--password=blahblah -P 3306 nagios -H)
echo "INSERT INTO apanserviceargs VALUES
('','$NEWIDX','1','CPULOAD','CPU-Load','LINE2');" | mysql -A -h
mysqlserver -u nagios --password=blahblah -P 3306 nagios -H
(I put in cr/lfs so you differentiate commands. they're each on one
contigious line, of course, when you run them)
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list