Page 1 of 3
Mod Gearman Installation Issue
Posted: Wed Dec 03, 2014 7:54 am
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
Re: Mod Gearman Installation Issue
Posted: Wed Dec 03, 2014 11:57 am
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.
Re: Mod Gearman Installation Issue
Posted: Tue Dec 09, 2014 4:44 am
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
Re: Mod Gearman Installation Issue
Posted: Tue Dec 09, 2014 10:37 am
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.
Re: Mod Gearman Installation Issue
Posted: Tue Dec 09, 2014 10:43 am
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?
Re: Mod Gearman Installation Issue
Posted: Tue Dec 09, 2014 10:48 am
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.
Re: Mod Gearman Installation Issue
Posted: Tue Dec 09, 2014 2:03 pm
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
Re: Mod Gearman Installation Issue
Posted: Tue Dec 09, 2014 4:36 pm
by abrist
Yes, as long as you use a servicegroup to group them and restrict that worker to just checks in that servicegroup.
Re: Mod Gearman Installation Issue
Posted: Wed Dec 10, 2014 7:11 am
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?
Re: Mod Gearman Installation Issue
Posted: Wed Dec 10, 2014 1:13 pm
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).