the ejabberd_ plugin will fail with: "Unable to find ejabberd.cfg. Exiting." A quick look in the file will show ------------------------------------------------------- for CFGPATH in /etc/ejabberd /usr/local/ejabberd/etc; do if [ -f "$CFGPATH/ejabberd.cfg" ]; then EJCFG=$CFGPATH/ejabberd.cfg; fi done if [ -z "$EJCFG" ]; then echo "Unable to find ejabberd.cfg. Exiting." >&2 exit -1 fi ------------------------------------------------------- But on gentoo, this file is not in /etc/ejabberd, rather in /etc/jabber/. I did a local modification to the plugin, but i'd prefer this to be done by the package. Reproducible: Always
Hmm, would you mind researching if that /etc/jabber path is a Gentoo-specific thing. If so, we can fix it in the Gentoo munin package, otherwise the patch should be submitted upstream. Thanks for your assistance.
I think the ejabberd-2.1.8.ebuild kinda changes the /etc/xx directory. It has those lines, among others: --------------------------------------------------------------- JABBER_ETC="${EPREFIX}/etc/jabber" # Set correct paths sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${PF}:}" \ -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \ -e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \ -e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \ -i Makefile.in || die sed -e "/EJABBERDDIR=/{s:ejabberd:${PF}:}" \ -e "s|\(ETCDIR=\)@SYSCONFDIR@.*|\1${JABBER_ETC}|" \ -e "s|\(LOGS_DIR=\)@LOCALSTATEDIR@.*|\1${JABBER_LOG}|" \ -e "s|\(SPOOLDIR=\)@LOCALSTATEDIR@.*|\1${JABBER_SPOOL}|" \ -i ejabberdctl.template || die --------------------------------------------------------------- Although it does not explicitely remove the /etc/ejabberd/, it's dealing with SYSCONFDIR, so i'm not sure.
Please let us know if this is still a problem with version 2.0.5.
I will, but not soon. Migrating from munin 1.x to 2.x doesn't seem as trivial as I would expect and i have quite a few servers. It's ok for the ticket to stay on 'test-request' for some times, right ?
Yes it's fine. The migration from 1.x to 2.x should be pretty painless anyway, at least with the Gentoo packages: we default to "old-style cron" (like Debian does at this point), since CGI is ... unsafe. And that's basically the only thing that made the upgrade painful. There are a few features that we don't yet support fully (SSH transport; asyncd) but those don't preclude the use of Munin as it was before.
Tested today with net-analyzer/munin-2.0.5-r2 It still fails : verdi plugins # munin-run ejabberd_ Unable to find ejabberd.cfg. Exiting. Reading the plugin code (/usr/libexec/munin/plugins/ejabberd_ ), one can see that it still looks in /etc/ejabberd/ only. The plugin perldoc clearly mentions the problem in the BUG section : -------------------------------------------------- There is no way to configure the "/etc" path. /etc/ejabberd and /usr/local/ejabberd/etc is hardcoded in the script. -------------------------------------------------- Now i'm quite confused... did you have any reason to hope munin2 (or the munin2 gentoo package) would kinda solve the problem ?
No simply I wanted to ask for more testing on recent versions. Will fix the plugin.
Okay so this one is queued for Munin 2.0.7 .. which was supposed to come out last week. Probably will make a new patchset for 2.0.6 tomorrow or so.
Finally fixed as 2.0.7 is out and we have no patches applied beside the IPMI plugin.
May I (gently) disagree ? I updated to net-analyzer/munin-2.0.7 ------------------------------------ verdi plugins # munin-run ejabberd_connections Unable to find ejabberd.cfg. Exiting. ------------------------------------ Which is not surprising, as the code still doesn't consider /etc/jabber. I might re-explain : look for "CFGPATH" in the file "ejabberd_" installed by munin. It tries several directories when looking for the ejabberd.cfg file. Gentoo uses "/etc/jabber", and this one is NOT looked after by the munin plugin. It is true that munin 2.0.7 has added a new path, but the one for gentoo is still not considered.. so it fails.
There is a configuration option now.
yeps, I noticed it and i'm using it. But... that means that every gentoo users that will install ejabberd and munin will have the plugin not working by default. That feels weird, doesn't it ? I mean each and every one gentoo user will have to debug/google/find the solution and configure the stuf..???
The problem is that somebody else got me the path that is in there.. and I'm actually not sure if I want to find out (again) how ejabberd works and understand why two people who should be using the same code are using different paths... So until there's a tiebreaker... I'll keep it this way :/
(In reply to comment #13) > The problem is that somebody else got me the path that is in there.. and I'm > actually not sure if I want to find out (again) how ejabberd works and > understand why two people who should be using the same code are using > different paths... I guess that would be me. Quoting from my chat log: graaff@jabber.xs4all.nl: Just add /etc/jabber to the search path in the plugin05:27:32 PM graaff@jabber.xs4all.nl: for CFGPATH in /etc/ejabberd /etc/jabber /usr/local/ejabberd/etc; do 05:27:57 PM graaff@jabber.xs4all.nl: /etc/jabber is new05:28:04 PM