Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54297 - Please include ebuild for apan
Summary: Please include ebuild for apan
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Default Assignee for New Packages
URL: http://apan.sourceforge.net/
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2004-06-18 04:23 UTC by John Herdy
Modified: 2006-11-16 08:02 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
apan-0.3.0.ebuild (apan-0.3.0.ebuild,1.01 KB, text/plain)
2004-06-22 02:02 UTC, Eldad Zack (RETIRED)
Details
apan-0.3.0.ebuild (apan-0.3.0.ebuild,1.58 KB, text/plain)
2005-02-25 20:51 UTC, Daniel Black (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Herdy 2004-06-18 04:23:04 UTC
In the GWN of a few weeks ago I read that Gentoo uses Nagios for monitoring the Gentoo infrastructure. Not knowing Nagios before I have tried it and fallen in love with it. We have deployed Gentoo and Nagios to monitor our infrastructure. Plain Nagios is just missing one thing and that is history of performance counters. This is neccessary for Capacity Management. Fortunately APAN fills in this gap. Unfortunately there isn't an ebuild for APAN in the tree. I'm not able to create an ebuild myself so I want to request the developers and/or someone from the Gentoo community to create an ebuild for APAN. Thanks a lot in advance!!!

Reproducible: Always
Steps to Reproduce:
Comment 1 Eldad Zack (RETIRED) gentoo-dev 2004-06-22 02:02:07 UTC
Created attachment 33808 [details]
apan-0.3.0.ebuild
Comment 2 Eldad Zack (RETIRED) gentoo-dev 2004-06-22 02:02:28 UTC
Please test.
Comment 3 John Herdy 2004-06-23 07:26:21 UTC
Thank a lot!!! I'm testing right now and report back later.
Comment 4 John Herdy 2004-06-23 09:48:17 UTC
I'm not able to get results, This is what I have done;
ebuild /usr/portage/dev-db/mysql/mysql-4.0.18-r2.ebuild config
cd /usr/nagios/
chown nagios:nagios apan/ -R
cd /usr/nagios/apan/
cp apan-sql.cgi /usr/nagios/sbin/
cp generate-sql.cgi /usr/nagios/sbin/
cd /usr/nagios/sbin/
chown nagios:nagios *
chmod 775 *.cgi
cp /usr/nagios/apan/graph.png /usr/nagios/share/images/logos/
chown nagios:nagios /usr/nagios/share/images/logos/graph.png

Modify /usr/nagios/apan/apan-sql.sh and replace DEFSFILE=/usr/local/nagios/apan-sql/apan.defs with DEFSFILE=/usr/nagios/apan/apan.defs
Modify /usr/nagios/apan/apan-sql.cgi and replace DEFSFILE=/usr/local/nagios/apan-sql/apan.defs with DEFSFILE=/usr/nagios/apan/apan.defs
Modify /usr/nagios/sbin/apan-sql.cgi and replace DEFSFILE=/usr/local/nagios/apan-sql/apan.defs with DEFSFILE=/usr/nagios/apan/apan.defs
Modify /usr/nagios/apan/generate-sql.cgi and replace DEFSFILE=/usr/local/nagios/apan-sql/apan.defs with DEFSFILE=/usr/nagios/apan/apan.defs
Modify /usr/nagios/apan/apanconf-sql and replace . /usr/local/nagios/apan-sql/apan.defs with . /usr/nagios/apan/apan.defs
Modify /usr/nagios/apan/apan.defs and replace NAGIOSDIR=/usr/local/nagios with NAGIOSDIR=/usr/nagios
Modify /usr/nagios/apan/apan.defs and replace APANDIR=$NAGIOSDIR/apan-sql with APANDIR=$NAGIOSDIR/apan
Modify /usr/nagios/apan/apan.defs and replace ETCDIR=$NAGIOSDIR/etc with ETCDIR=/etc/nagios
Modify /usr/nagios/apan/apanconf.defs and replace NAGIOSDIR=/usr/local/nagios with NAGIOSDIR=/usr/nagios
Modify /usr/nagios/apan/apanconf.defs and replace APANDIR=$NAGIOSDIR/apan-sql with APANDIR=$NAGIOSDIR/apan
Modify /usr/nagios/apan/apanconf.defs and replace EXTINFOFILE=$NAGIOSDIR/etc/servicextinfo-apan with EXTINFOFILE=/usr/nagios/apan/servicextinfo-apan
Modify /usr/nagios/apan/apanconf.defs and replace CGIURL=/nagios/cgi-bin with CGIURL=/usr/nagios/sbin	
Modify /usr/nagios/apan/sql.conf and replace SQLPASS=nagios123 with SQLPASS=<password>
Modify /usr/nagios/apan/createdb.sh and replace CFGFILE=/usr/local/nagios/apan-sql/apan.defs with CFGFILE=/usr/nagios/apan/apan.defs

start mysql and type create database nagios;
	grant all on nagios.* to nagios@localhost identified by '<password>';

/usr/nagios/apan/createdb.sh


Modify /etc/nagios/checkcommands.cfg and add to the bottom
define command {
        command_name    apan
        command_line    /usr/nagios/apan/apan-sql.sh $ARG1$ $HOSTNAME$ $SERVICEDESC$ $TIMET$ $ARG2$ $ARG3$
        }

Modify /etc/nagios/services.cfg and add to the bottom
define service {
host_name                      <servername>
service_description            PingApan
check_command                  apan!ping!100.0,20%!500.0,60%
name                           Ping
use                            generic-service
normal_check_interval          1
}

/usr/nagios/apan/apanconf-sql
1
<servername>
PingApan
Test Ping Apan
<enter>
PingApan
%
<enter>
<enter>
load1
load1
1
<enter>
<enter>
<enter>
load5
load5
1
<enter>
<enter>
<enter>
load15
load15
1
<enter>
<enter>
<enter>



I see an extra icon besides the service, however if I click it I get the following notification The requested URL /usr/nagios/sbin/apan-sql.cgi was not found on this server. I'm positive that the file is present. Also I see on the status information "RRD-file does not exist or is not writeable".

For the moment I'm out of ideas, I wil try again later.
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2004-06-23 10:00:22 UTC
Why was I added to the CC list?
Comment 6 Eldad Zack (RETIRED) gentoo-dev 2004-06-23 14:11:57 UTC
Hmm. I see you basically did a manual install... so, this ebuild wasn't of any real use.
I'll have to punch it into form.

John, why did you add Chris to the CC?
Comment 7 John Herdy 2004-06-25 01:40:18 UTC
Thanks for your reply. I will wait for your adjustments, will try it and report back again. As for why I added Chris to the CC-list, I have no clue how that happend. Sorry to bother you.
Comment 8 Chris Gianelloni (RETIRED) gentoo-dev 2004-06-25 04:41:21 UTC
No problem... I was figuring it was because my @gentoo.org address shows up quote a bit recently in the apan-users mailing list.

I ended up finding most of apan unusable in my environment and went instead with a custom re-write.
Comment 9 John Herdy 2004-06-25 08:12:48 UTC
Wow, is the custom re-write ready for production use and do you want to make it available to the Gentoo-crowd?

Do you have any insights why Apan is unusable in your environment? Do you use Nagios?

Thanks.
Comment 10 Daniel Black (RETIRED) gentoo-dev 2005-02-25 20:51:48 UTC
Created attachment 52162 [details]
apan-0.3.0.ebuild

ebuild /usr/portage/dev-db/mysql/mysql-4.0.18-r2.ebuild config
didn't work cause there is no pkg_config routine in the ebuild.

Can you create one to do the sql stuff and nagios configuration files?

Is the chown nagios:nagios necessary?

Please we need your help to correct this if you want it added.
Comment 11 Markus Ullmann (RETIRED) gentoo-dev 2006-11-16 08:02:33 UTC
apan is heavily outdated and has dead upstream. There are better options available on NagiosExchange that even work with nagios-2*