<meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><meta http-equiv="content-type" content="text/html; charset=utf-8">Just attached Andreas' response from another thread. <br>
</div><div><br></div><div>@Dan, I've taken a look at Multisite. It seems to have some crazy batch commands/comments which are exactly what I am looking for. I tried it a bit but ended up getting segfault from apache when I accessed the webpage localhost/check_mk/. It's probably because I have too many sites running on my test box. Will try again later. Thanks for the recommendation.</div>
<div><br></div><div>@Michael, Icinga would be good if I started from sratch. It is pain for me to migrate everything to Icinga though because the default file structure is different and the web ui is not as straightforward as Nagios core. Thanks for showing me the OMD, didn't aware of it at all.</div>
<div> </div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">@Andreas, I am defining "large number of hosts" as >= one thousand, and each host is likely to have +/- 10 services, so you get the idea :) I agree with you that Thruk doesn't look as good as others, so I am looking into Check_MK Multisite as it has some pretty useful commands/shortcuts/features. I don't use the report feature that much, so Multisite should be good enough. Yeah, hacking the cgi is really undesirable. I will just try to adapt anohter UI like Multisite. </div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">Thanks for all the response! </div><div><br></div><div>
Jake</div><div><br><div class="gmail_quote">On Tue, Jan 10, 2012 at 1:18 AM, Andreas Ericsson <span dir="ltr"><<a href="mailto:ae@op5.se">ae@op5.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
On 01/09/2012 08:53 PM, Jake Xu wrote:<br>> Hi everyone,<br>><br>>> From time to time, I need to restart or reschedule all services to verify<br>> that some new checks or new hosts are working properly. Is there any easy<br>
> way to do that? I have a large number of hosts and services, so it would be<br>> tedious to click through a bunch of links via the web interface. Using<br>> external command is not very feasible as well because I would have to have<br>
> all host names and service names for the command line commands.<br>><br>> I have seen a pretty good idea on Icinga, a Nagios fork, for this purpose.<br>> It has a checkbox associated with each service check and a select-all<br>
> checkbox to select all checkboxes. It would be useful to have that on the<br>> Nagios Core, but AFAIK there isn't any.<br>><br><br>Pretty much all other UI's but the basic one has this capability. Speedwise,<br>
I'd imagine Thruk and Multisite would suit you very well. It sort of depends<br>on how you define "large number of hosts and services" though. Most UI's<br>scale just fine to a couple of thousand hosts, although certain parts of it<br>
might suck donkey balls with huge networks. Multisite suffers when creating<br>reports, for example, but is crazy fast at showing current status. Thruk is<br>faster at both (last time I checked), but it's, imo, pretty ugly (sorry Sven)<br>
and lacks a bunch of boss-bling type features that other UI's have.<br><br></blockquote><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
YMMV.<br><br>As for adding that capability to the "default" ui; That's not going to happen<br>unless someone provides a patch for it. None of the maintainers have any<br>interest in adding features to the cgi, so they're there simply as a fallback<br>
and will most likely be removed some time in the future in favour of a ui<br>written in some more easily hackable language.<br><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888">--<br>Andreas Ericsson <a href="mailto:andreas.ericsson@op5.se">andreas.ericsson@op5.se</a><br>OP5 AB <a href="http://www.op5.se/" target="_blank">www.op5.se</a><br>
Tel: <a href="tel:%2B46%208-230225" value="+468230225">+46 8-230225</a> Fax: <a href="tel:%2B46%208-230231" value="+468230231">+46 8-230231</a><br><br>Considering the successes of the wars on alcohol, poverty, drugs and<br>
terror, I think we should give some serious thought to declaring war<br>on peace.<br></font></span></blockquote><div><span class="HOEnZb"><font color="#888888"><br></font></span></div></div><br><div class="gmail_quote">On Mon, Jan 9, 2012 at 1:17 PM, <span dir="ltr"><<a href="mailto:andrew.ford@wellsfargo.com">andrew.ford@wellsfargo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="white" lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I usually combine the classic external command scripts with a smidge of perl to grab the members of the hostgroup that I want to trigger something for.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">If you give the following script a hostgroup name, it will grab the members from objects.cache:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">#!/usr/local/nagios/bin/perl<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">use warnings;<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">use strict;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">my $hostgroup = $ARGV[0];<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"># here’s the spot where I should be checking that $hostgroup is defined…<u></u><u></u></span></p><p class="MsoNormal">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">open my $objects,'<','/usr/local/nagios/var/objects.cache' or die "Failure opening objects file: $!\n";<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">$/ = '}';<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">while (<$objects>) {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> if (/hostgroup_name\s+($hostgroup)/gs) {<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> /members\s+(\S+)/gs;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> my $members = $1;<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> my @members = split /,/,$members;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> for my $member (@members) {<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> print "$member\n";<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> }<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> }<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">}<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">close $objects;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">When you run that you get a list that you can feed to your external command script.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Here’s the idea in shell on the command line:<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">bash# for x in `get_hostgroup_members big_switches`;do trigger_service_script $x;done <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> </span></p></div></div></blockquote><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="white" lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u></span></p><p class="MsoNormal">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Georgia","serif";color:#548dd4">Andy Ford<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Georgia","serif";color:#548dd4">Network Security Engineer | Solutions Design & Automation| Information Security Technology<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Georgia","serif";color:#548dd4"><a href="tel:314-348-4937" value="+13143484937" target="_blank">314-348-4937</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Georgia","serif";color:#548dd4"><a href="mailto:andrew.ford@wellsfargo.com" target="_blank">andrew.ford@wellsfargo.com</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> Michael Friedrich [mailto:<a href="mailto:michael.friedrich@univie.ac.at" target="_blank">michael.friedrich@univie.ac.at</a>] <br>
</span></p><div class="im"><b>Sent:</b> Monday, January 09, 2012 2:54 PM<br><b>To:</b> <a href="mailto:nagios-users@lists.sourceforge.net" target="_blank">nagios-users@lists.sourceforge.net</a><br></div><b>Subject:</b> Re: [Nagios-users] How to reschedule multiple/all services at once<u></u><u></u><p>
</p></div></div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><tt><span style="font-size:10.0pt">On 09.01.2012 20:53, Jake Xu wrote:</span></tt> <u></u><u></u></p><p class="MsoNormal"><tt><span style="font-size:10.0pt">Hi everyone,</span></tt> <u></u><u></u></p>
<div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><p class="MsoNormal"><tt><span style="font-size:10.0pt">From time to time, I need to restart or reschedule all services to verify that some new checks or new hosts are working properly. Is there any easy way to do that? I have a large number of hosts and services, so it would be tedious to click through a bunch of links via the web interface. Using external command is not very feasible as well because I would have to have all host names and service names for the command line commands.</span></tt><u></u><u></u></p>
</div></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><tt><span style="font-size:10.0pt">I have seen a pretty good idea on Icinga, a Nagios fork, for this purpose. It has a checkbox associated with each service check and a select-all checkbox to select all checkboxes. </span></tt><u></u><u></u></p>
</div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><br><tt>hehe. you just made ricardo and rune proud :-))</tt><br><br><br></span><u></u><u></u></p><div><p class="MsoNormal"><tt><span style="font-size:10.0pt">It would be useful to have that on the Nagios Core, but AFAIK there isn't any.</span></tt><u></u><u></u></p>
</div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><br><br><tt>for the problem itsself - try OMD. nagios, icinga, shinken as core available whilst the gui decision is up to you.</tt><br>
<br><tt><a href="http://omdistro.org" target="_blank">http://omdistro.org</a></tt><br><br><br></span><u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><tt><span style="font-size:10.0pt">Thanks in advance,</span></tt><u></u><u></u></p>
</div><div><p class="MsoNormal"><tt><span style="font-size:10.0pt">Jake</span></tt><u></u><u></u></p></div><pre><tt><u></u> <u></u></tt></pre><pre><tt><u></u> <u></u></tt></pre><pre><tt>------------------------------------------------------------------------------<u></u><u></u></tt></pre>
<pre><tt>Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex<u></u><u></u></tt></pre><pre><tt>infrastructure or vast IT resources to deliver seamless, secure access to<u></u><u></u></tt></pre><pre>
<tt>virtual desktops. With this all-in-one solution, easily deploy virtual <u></u><u></u></tt></pre><pre><tt>desktops for less than the cost of PCs and save 60% on VDI infrastructure <u></u><u></u></tt></pre><pre><tt>costs. Try it free! <a href="http://p.sf.net/sfu/Citrix-VDIinabox" target="_blank">http://p.sf.net/sfu/Citrix-VDIinabox</a></tt><u></u><u></u></pre>
<pre><tt><u></u> <u></u></tt></pre><pre><tt><u></u> <u></u></tt></pre><pre><tt>_______________________________________________<u></u><u></u></tt></pre><pre><tt>Nagios-users mailing list<u></u><u></u></tt></pre><pre><tt><a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a><u></u><u></u></tt></pre>
<pre><tt><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><u></u><u></u></tt></pre><pre><tt>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. <u></u><u></u></tt></pre>
<pre><tt>::: Messages without supporting info will risk being sent to /dev/null</tt><u></u><u></u></pre><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><br><br><br></span><u></u><u></u></p>
<pre><tt>-- <u></u><u></u></tt></pre><pre><tt>DI (FH) Michael Friedrich<u></u><u></u></tt></pre><pre><tt><u></u> <u></u></tt></pre><pre><tt>Vienna University Computer Center<u></u><u></u></tt></pre><pre><tt>Universitaetsstrasse 7 A-1010 Vienna, Austria<u></u><u></u></tt></pre>
<pre><tt><u></u> <u></u></tt></pre><pre><tt>email: <a href="mailto:michael.friedrich@univie.ac.at" target="_blank">michael.friedrich@univie.ac.at</a><u></u><u></u></tt></pre><pre><tt>phone: <a href="tel:%2B43%201%204277%2014359" value="+431427714359" target="_blank">+43 1 4277 14359</a><u></u><u></u></tt></pre>
<pre><tt>mobile: <a href="tel:%2B43%20664%2060277%2014359" value="+436646027714359" target="_blank">+43 664 60277 14359</a><u></u><u></u></tt></pre><pre><tt>fax: <a href="tel:%2B43%201%204277%2014338" value="+431427714338" target="_blank">+43 1 4277 14338</a><u></u><u></u></tt></pre>
<pre><tt>web: <a href="http://www.univie.ac.at/zid" target="_blank">http://www.univie.ac.at/zid</a><u></u><u></u></tt></pre><pre><tt> <a href="http://www.aco.net" target="_blank">http://www.aco.net</a><u></u><u></u></tt></pre>
<pre><tt><u></u> <u></u></tt></pre><pre><tt>Lead Icinga Core Developer<u></u><u></u></tt></pre><pre><tt><a href="http://www.icinga.org" target="_blank">http://www.icinga.org</a><u></u><u></u></tt></pre></div></div></div></div>
<br>------------------------------------------------------------------------------<br>
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex<br>
infrastructure or vast IT resources to deliver seamless, secure access to<br>
virtual desktops. With this all-in-one solution, easily deploy virtual<br>
desktops for less than the cost of PCs and save 60% on VDI infrastructure<br>
costs. Try it free! <a href="http://p.sf.net/sfu/Citrix-VDIinabox" target="_blank">http://p.sf.net/sfu/Citrix-VDIinabox</a><br>_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br></div>