Mod Gearman Installation Issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Mod Gearman Installation Issue

Post by WillemDH »

Hello,

I'm having some issues installing mod gearman on my Nagios production server. I'm following the 'offical' Nagios XI Mod Gearman installation guide for 2014. (http://assets.nagios.com/downloads/nagi ... ios_XI.pdf

Code: Select all

yum localinstall -–nogpgcheck mod_gearman-1.5.0b1-1.el6.x86_64.rpm
Loaded plugins: fastestmirror, security
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 294, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 115, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 251, in getOptionsConfig
    (opts, self.cmds) = self.optparser.setupYumConfig(args=args)
  File "/usr/share/yum-cli/cli.py", line 1456, in setupYumConfig
    (opts, cmds) = self.parse_args(args=args)
  File "/usr/lib64/python2.6/optparse.py", line 1396, in parse_args
    self.error(str(err))
  File "/usr/lib64/python2.6/optparse.py", line 140, in __str__
    return _("no such option: %s") % self.opt_str
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1: ordinal not in range(128)
This looks like a Python error to me, so I checked the Python version on my server, which seems to be 2.6.6.

So how should I proceed with this installation?

Grtz

Willem
Nagios XI 5.8.1
https://outsideit.net
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Mod Gearman Installation Issue

Post by sreinhardt »

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1: ordinal not in range(128)
According to the error, you entered a non-ascii character as the very first char. I'd maybe try not copying and pasting from the pdf if that is what you did to get this. While nothing there appears to be non-ascii, doc to pdf saving can throw some strange stuff in there. Otherwise it seems like a bash/yum bug that would have to be looked into.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Mod Gearman Installation Issue

Post by WillemDH »

Spenser, you were correct sir. When copying from the pdf, something is wrong with the encoding. When typing everything over, it works.

Some other questions regarding to mod_gearman. The order of service to stop and start is described in the document:

Code: Select all

Service stop order:
service nagios stop
service mod_gearman_worker stop
service gearmand stop
Service start order:
service gearmand start
service mod_gearman_worker start
service nagios start
I was wondering if the mod_gearman worker service need to run on the Nagios XI server? Or only on the worker? I noticed there is no nagios service running on the worker node? I'm guessing this is normal too? Something in my head tells me this isn't gonna work. Do I need to install Nagios Core on the worker node?

So when I put some hosts in a hostgroup and put that hostgroup in the conf files, all checks for those hosts will be executed on the worker node? Only the host checks or also the linked service for that host?

Sorry for all the questions... Mod Gearman is very new to me. :)

Grtz

Willem
Nagios XI 5.8.1
https://outsideit.net
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Mod Gearman Installation Issue

Post by slansing »

Nagios itself still does all the check scheduling, then send it to the gearman queue which is broadcast to connected and authenticated remote worker systems, hence, why the only worker processes that are running are remote in that setup. You can run local workers as well, and even just running local workers has proven to be a performance enhancement in the past, however, that seems to be less the case with the new local core workers.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Mod Gearman Installation Issue

Post by WillemDH »

Hey Sam,

That covers some of my questions. Thanks.

So what about
I noticed there is no nagios service running on the worker node? I'm guessing this is normal too? Something in my head tells me this isn't gonna work. Do I need to install Nagios Core on the worker node?

So when I put some hosts in a hostgroup and put that hostgroup in the conf files, all checks for those hosts will be executed on the worker node? Only the host checks or also the linked service for that host?
Nagios XI 5.8.1
https://outsideit.net
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Mod Gearman Installation Issue

Post by slansing »

No problem! :)
I noticed there is no nagios service running on the worker node? I'm guessing this is normal too? Something in my head tells me this isn't gonna work. Do I need to install Nagios Core on the worker node?
- Nope, as I mentioned the scheduling occurrs on the Nagios server itself, you do not need a core process running on the remote gearman workers, only the plugins that are required for their checks.

So when I put some hosts in a hostgroup and put that hostgroup in the conf files, all checks for those hosts will be executed on the worker node? Only the host checks or also the linked service for that host?
- It should be that all host/service checks under that group are ran on that remote worker.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Mod Gearman Installation Issue

Post by WillemDH »

So, as I'm in the process of setting up a mrtg worker node, I would only need to copy the plugins used by the network / switch wizard to the worker node? :) (See http://support.nagios.com/forum/viewtop ... ilit=+mrtg)

See
Nagios XI 5.8.1
https://outsideit.net
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Mod Gearman Installation Issue

Post by abrist »

Yes, as long as you use a servicegroup to group them and restrict that worker to just checks in that servicegroup.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Mod Gearman Installation Issue

Post by WillemDH »

Ok, thanks. Another question. Just noticed, there seems to be an update yum package for gearmand.x86_64 1.1.8-2.el6. Can I safely yum update gearmand?
Nagios XI 5.8.1
https://outsideit.net
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Mod Gearman Installation Issue

Post by lmiltchev »

If mod gearman is working fine at the moment, I wouldn't recommend updating this package (just to be on a safe side).
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked