Lupe Christoph | 21 Mar 19:49 2006
Picon

Re: How about HP-UX support by Munin?

On Tuesday, 2006-03-21 at 18:36:35 +0100, Ralph.Grothe <at> itdz-berlin.de wrote:
> > From: Lupe Christoph [mailto:lupe <at> lupe-christoph.de]

> > IIRC the default user is nobody.

> Sorry, what does IIRC stand for?

If I Remember Correctly.

> As far as I can see there's no reference to nobody 
> in my config anymore.

As I said that is the default.

> There's only munin,
> my designated executor

That user is used only by the collector parts. The node requires
superuser credentials to be able to run plugins as any user, possibly
root.

> Have I missed a file where nobody comes into play?

Makefile.config:PLUGINUSER = nobody

> [root <at> gouda:/opt/munin/sbin]
> # sed -n 440p /opt/munin/sbin/munin-run
>         if (!exec ("$servicedir/$service", $command))

I think Rune explained that nicely. BTW, you should not run munin-run as
your user. Use root to make things as similar to the node environment as
possible.

> As I wrote in my reply to Rune's reply,
> that's an exec syscall where Perl's taint checking croaks

... and rightly so.

> > Please submit your patches to the Munin Trac. Also the plugins.
> > For the plugins, take http://munin.projects.linpro.no/ticket/47
> > as an example. A README on getting Munin running on HP-UX would
> > probably be very much appreciated by other people wanting to
> > do that.

> > We can then add HP-UX specific directories to the repository.

> I would like to 
> but haven't engaged in a project yet.
> I realized the Munin doc is Wiki based.
> I haven't yet participated to a Wiki base
> (only played a bit with TWiki once, but forgotten all by now)
> Is there a registration required (I guess so)?

Dunno. I never tried to add to the documentation, before they started
the Wiki or after.

> Meanwhile I have written a little Perl plug-in for the Informix
> instances
> I was asked to collect stats for.
> So far the functionality is pretty rudimentary
> in that it only collects session data from non informix users
> (i.e. the admin account)
> which it parses from the ubiquitious onstat Informix tool.
> (
> http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?to
> pic=/com.ibm.adref.doc/adref389.htm )
> Although it should be OS independent
> (apart from the proc table parsing, but this can better be
> replaced by Proc::ProcessTable)
> I fear it will be of little use to anyone else.
> I attached the script so that you could have a deko and tell me
> if it was worthwhile extending and
> beautifying/documenting/debugging it for the public domain?

I'd say that even if it is useless for anybody in the current form, it
can still serve as a starting point for somebody who also wants to
collect Informix statistics.

Why don't you let it "ripen" a while and then submit it to Trac?

Here are some comments (sorry, I'm a little tired, no extensive review).

my ($IFX_INST) = (split /\//, $0)[-1];

You should name your plugin ifxses_. Suggesting the Informix instances
will produce symlinks of the form ifxses_<instname>. Your script should
then take everything after ifxses_ as the instance name.

Please reindent your plugin so that code inside a sub is indented.

my %ifx_env = ( INFORMIXSERVER => 'gouda_shm',
                INFORMIXDIR    => '/opt/inf_altdb',
                ONCONFIG       => 'onconfig',
                MTCMD          => 'ses',
               );

Please obtain configurable values from %ENV. The plugin.conf file can
then be used to parametrize your plugin.

local %ENV = (UNIX95 => 1);

Looks like this is required for your HP environment. Please make this
conditional on $^O. Also, cleaning out the entire environment may not be
desirable. It forgoes the chance to pass things in from plugin.conf. (I
don't think any other plugin cleans it's environment, either.)

HTH,
Lupe Christoph
--

-- 
| You know we're sitting on four million pounds of fuel, one nuclear     |
| weapon and a thing that has 270,000 moving parts built by the lowest   |
| bidder. Makes you feel good, doesn't it?                               |
| Rockhound in "Armageddon", 1998, about the Space Shuttle               |

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

Gmane