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:
Created attachment 33808 [details] apan-0.3.0.ebuild
Please test.
Thank a lot!!! I'm testing right now and report back later.
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.
Why was I added to the CC list?
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?
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.
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.
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.
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.
apan is heavily outdated and has dead upstream. There are better options available on NagiosExchange that even work with nagios-2*