Nagios https://tech.feedyourhead.at/ en check_seleniumtime https://tech.feedyourhead.at/content/checkseleniumtime <span class="field field--name-title field--type-string field--label-hidden">check_seleniumtime</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Nagios-Check which loads a website in firefox and outputs the response-time of a website</p> <h3>Usage:</h3> <pre> <code> ./check_seleniumtime -h Usage: ./check_seleniumtime [ options ] -H -h, --help This help screen -d, --debug Enable debug-output -p, --perf Performance Data on or off -w, --warn RESPONSETIME Warning. default 3.5sec -c, --crit RESPONSETIME Critical. default 4.5sec -H, --host URL Website -s, --ssl enable ssl -P, --port PORTNUMBER used port -u, --uri used uri. for example: /impressum.html ./check_seleniumtime -H tech.feedyourhead.at OK: http://tech.feedyourhead.at 1.055 </code></pre> <h3>Requirements</h3> <ul> <li>apt-get install ruby firefox xvfb</li> <li>gem install selenium-webdriver</li> <li>gem install headless</li> </ul> <h3>Credits</h3> <p>This plugin is powered by <a href="http://www.toscom.at">Toscom</a></p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Oct 12 2015</span> <div class="clearfix text-formatted field field--name-field-md5sum field--type-text field--label-above"> <div class="field__label">md5sum</div> <div class="field__item"><p>3f18bd1e4fdd22e791de92921d9292a2</p> </div> </div> <div class="clearfix text-formatted field field--name-field-sha256sum field--type-text field--label-above"> <div class="field__label">sha256sum</div> <div class="field__item"><p>296e3ce2af725b4508b0abcc87563eb4fdc717dd2fe7b81b1d67feb78100a0a0</p> </div> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class="field__items"> <div class="field__item"><a href="/tags/download" hreflang="en">Download</a></div> <div class="field__item"><a href="/tags/selenium" hreflang="en">Selenium</a></div> <div class="field__item"><a href="/Nagios" hreflang="en">Nagios</a></div> <div class="field__item"><a href="/tags/nagios-check" hreflang="en">Nagios-Check</a></div> <div class="field__item"><a href="/tags/ruby" hreflang="en">Ruby</a></div> <div class="field__item"><a href="/Programming" hreflang="en">Programming</a></div> </div> </div> <section class="field field--name-comment-node-download field--type-comment field--label-hidden comment-wrapper"> </section> Mon, 12 Oct 2015 07:08:05 +0000 Hoti 118 at https://tech.feedyourhead.at Nagios: cleaning up nagios-logs https://tech.feedyourhead.at/content/nagios-cleaning-nagios-logs <span class="field field--name-title field--type-string field--label-hidden">Nagios: cleaning up nagios-logs</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p><img alt="" src="http://tech.feedyourhead.at/sites/tech.feedyourhead.at/files/pictures/nagios-logo.jpg" style="width: 406px; height: 115px;" /></p> <p>I've found an <a href="http://monitoringtt.blogspot.co.at/2011/12/managing-nagios-logs.html">interesting article</a> about cleaning up nagios-logs.</p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Sep 24 2015</span> <div class="field field--name-field-tagies field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class='field__items'> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Nagios" hreflang="en">Nagios</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Linux" hreflang="en">Linux</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/sysadmin" hreflang="en">Sysadmin</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/tricks" hreflang="en">Tricks</a></div> </div> </div> <section class="field field--name-comment-node-blog field--type-comment field--label-hidden comment-wrapper"> </section> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class='title comment-form__title'> <i class="fa fa-comments-o"></i> Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=112&amp;2=comment&amp;3=comment" token="DJ7KyjdifaQWkAP_Ctf1FfiID8mJD1d7r-QItNktCRg"></drupal-render-placeholder> </section> Thu, 24 Sep 2015 13:34:02 +0000 Hoti 112 at https://tech.feedyourhead.at Debian Jessie: nrpe without command-args https://tech.feedyourhead.at/content/debian-jessie-nrpe-without-command-args <span class="field field--name-title field--type-string field--label-hidden">Debian Jessie: nrpe without command-args</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Due to security issues nrpe-server in Debian Jessie is now compiled without "--enable-command-args". If you want to use it you have to recompile it.</p> <pre> <code> nagios-nrpe (2.15-1) unstable; urgency=high This update disables the command-args support in nrpe. The feature has several security problems and is often used wrong. If you have to use this feature recompile the package with --enable-command-args in debian/rules. -- Alexander Wirt <formorer@debian.org> Tue, 15 Jul 2014 09:52:48 +0200 </formorer@debian.org></code></pre> <p>Maybe that's a good point of time to use check_mk..</p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">May 28 2015</span> <div class="field field--name-field-tagies field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class='field__items'> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/sysadmin" hreflang="en">Sysadmin</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Nagios" hreflang="en">Nagios</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Linux" hreflang="en">Linux</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/debian" hreflang="en">Debian</a></div> </div> </div> <section class="field field--name-comment-node-blog field--type-comment field--label-hidden comment-wrapper"> </section> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class='title comment-form__title'> <i class="fa fa-comments-o"></i> Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=92&amp;2=comment&amp;3=comment" token="g2PgVxDFSIuQKdkmVIeEepo1PoHZNpkHBYObCFNlw-g"></drupal-render-placeholder> </section> Thu, 28 May 2015 08:46:13 +0000 Hoti 92 at https://tech.feedyourhead.at check_pear_upgrade https://tech.feedyourhead.at/content/checkpearupgrade <span class="field field--name-title field--type-string field--label-hidden">check_pear_upgrade</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>This is a nagios-check which checks for available pear-updates. I use it for checking horde upgrades. I schedule it for every hour so that it doesn't make too much traffic on the pear-repository.</p></div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Nov 19 2014</span> <div class="field field--name-field-datei field--type-file field--label-above"> <div class="field__label">File</div> <div class="field__item"> <span class="file file--mime-application-octet-stream file--general"> <a href="https://tech.feedyourhead.at/sites/default/files/DateiUploads/check_pear_upgrade.tar_0.gz" type="application/octet-stream; length=1225">check_pear_upgrade.tar.gz</a></span> </div> </div> <div class="clearfix text-formatted field field--name-field-md5sum field--type-text field--label-above"> <div class="field__label">md5sum</div> <div class="field__item">f5afb1029bdfa6f959463aa62db7a77e</div> </div> <div class="clearfix text-formatted field field--name-field-sha256sum field--type-text field--label-above"> <div class="field__label">sha256sum</div> <div class="field__item">92bb2aa79e649a5f44acd5d0335a6e36246d2bb175a1acc94fcd80d69e80735d</div> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class="field__items"> <div class="field__item"><a href="/tags/downloads" hreflang="en">Downloads</a></div> <div class="field__item"><a href="/Nagios" hreflang="en">Nagios</a></div> <div class="field__item"><a href="/tags/sysadmin" hreflang="en">Sysadmin</a></div> </div> </div> <section class="field field--name-comment-node-download field--type-comment field--label-hidden comment-wrapper"> </section> Wed, 19 Nov 2014 17:59:39 +0000 Hoti 49 at https://tech.feedyourhead.at Converting UNIX-Timestamp into a readable time-format https://tech.feedyourhead.at/content/converting-unix-timestamp-readable-time-format <span class="field field--name-title field--type-string field--label-hidden">Converting UNIX-Timestamp into a readable time-format</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Assume we have a nagios-logfile(nagios.log) like this:</p> <pre> <code> [1416415259] PASSIVE HOST CHECK: server1;0;PING OK - Packet loss = 0%, RTA = 0.04 ms [1416415259] PASSIVE HOST CHECK: server2;0;PING OK - Packet loss = 0%, RTA = 0.04 ms [1416415259] EXTERNAL COMMAND: PROCESS_HOST_CHECK_RESULT;server3;0;PING OK - Packet loss = 0%, RTA = 0.15 ms </code></pre> <p>Then we can convert the UNIX-Timestamp using the following command:</p> <pre> <code> perl -n -e 'if ($_ =~ m/^\[(\d+)\] (.*)$/g){ print scalar localtime($1) . " $2" ."\n"; }' nagios.log </code></pre> <p>This would be our output then:</p> <pre> <code> Wed Nov 19 17:40:59 2014 PASSIVE HOST CHECK: server1;0;PING OK - Packet loss = 0%, RTA = 0.04 ms Wed Nov 19 17:40:59 2014 PASSIVE HOST CHECK: server2;0;PING OK - Packet loss = 0%, RTA = 0.04 ms Wed Nov 19 17:40:59 2014 EXTERNAL COMMAND: PROCESS_HOST_CHECK_RESULT;server3;0;PING OK - Packet loss = 0%, RTA = 0.15 ms </code></pre> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Nov 19 2014</span> <div class="field field--name-field-tagies field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class='field__items'> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Linux" hreflang="en">Linux</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Nagios" hreflang="en">Nagios</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/one-liner" hreflang="en">One-Liner</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/bash" hreflang="en">Bash</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/perl" hreflang="en">Perl</a></div> </div> </div> <section class="field field--name-comment-node-blog field--type-comment field--label-hidden comment-wrapper"> </section> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class='title comment-form__title'> <i class="fa fa-comments-o"></i> Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=16&amp;2=comment&amp;3=comment" token="EB6QcaYCufqwNDXs6N9Q8dAWj4FsozjpCPYWAbAx0pc"></drupal-render-placeholder> </section> Wed, 19 Nov 2014 16:45:34 +0000 Hoti 16 at https://tech.feedyourhead.at Monitoring Horde-Framework-Upgrades using Nagios https://tech.feedyourhead.at/content/monitoring-horde-framework-upgrades-using-nagios <span class="field field--name-title field--type-string field--label-hidden">Monitoring Horde-Framework-Upgrades using Nagios</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p><a href="http://www.nagios.org" target="_blank"><img alt="" src="http://tech.feedyourhead.at/sites/tech.feedyourhead.at/files/pictures/nagios-logo.jpg" style="float: right;" /></a><a href="http://www.horde.org" target="_blank"><img alt="" src="http://tech.feedyourhead.at/sites/tech.feedyourhead.at/files/pictures/445px-Horde-logo.svg.png" style="width: 325px; height: 131px;" /></a></p> <p>Nagios is an awesome monitoring-tool. I give my best to check as much services as possible with nagios. Here I want to explain how I check if updates for the Horde-Framework exist...</p> <p>Although horde uses pear for update-management I don't want to check pear directly(because of permissions and of course I don't want to create too much traffic on the horde-repository). That's why i use the following cronjob which checks for upgrades once an hour:</p> <pre> <code> 45 * * * * pear list-upgrades > /var/log/pear_check_updates.log </code></pre> <p>Now this nagios-check(check_pear_updates.pl) can use this information:</p> <pre> <code> #!/usr/bin/perl ########################################################################### # # you need a cronjob with this command: # pear list-upgrades > /var/log/pear_check_updates.log # ########################################################################## my $pearchannel = 'Waynes World! Waynes World! Party time! Excellent!'; my @logarr = undef; my $found = 0; my $checkother = 0; my $available_upgrades = 0; my $ret = 2; if($#ARGV < 0) { print "usage: $0 <log-file> [ <pear-channel> ]\n"; exit 3; } my $pearlog = $ARGV[0]; $pearchannel = $ARGV[1] if($#ARGV > 0); unless(open(PEARLOG,"< $pearlog")) { print "Error: can not open logfile: $pearlog\n"; exit 3; } while(<PEARLOG>) { my $tmp = $_; $available_upgrades++ if($tmp =~ /AVAILABLE UPGRADES/); if($tmp =~ /^Channel $pearchannel/) { print $tmp; } else { my @tmparr = split(/\s+/,$tmp); if($tmparr[0] eq $pearchannel) { print "$tmparr[1] $tmparr[2] $tmparr[3] $tmparr[4] $tmparr[5] $tmparr[6],"; $found = 1; } } push(@logarr,$tmp); } close(PEARLOG); exit $ret if($found == 1); if($checkother == 1) { if($available_upgrades > 0) { print "found $available_upgrades other updates than $pearchannel\n"; exit 1; } } exit 0; </code></pre> <p>If we correctly set the permissions for the&nbsp; pear-logfile, our nagios-check can read it.</p> <p><a href="http://tech.feedyourhead.at/content/checkpearupgrade">Here is the download to the full source-code</a></p> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/hoti" typeof="schema:Person" property="schema:name" datatype="">Hoti</span></span> <span class="field field--name-created field--type-created field--label-hidden">Nov 19 2014</span> <div class="field field--name-field-tagies field--type-entity-reference field--label-above"> <div class="field__label">Tags</div> <div class='field__items'> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Linux" hreflang="en">Linux</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/horde" hreflang="en">Horde</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Nagios" hreflang="en">Nagios</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/tags/perl" hreflang="en">Perl</a></div> <div class="field__item"><i class="fa fa-tags"></i> <a href="/Programming" hreflang="en">Programming</a></div> </div> </div> <section class="field field--name-comment-node-blog field--type-comment field--label-hidden comment-wrapper"> </section> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class='title comment-form__title'> <i class="fa fa-comments-o"></i> Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=13&amp;2=comment&amp;3=comment" token="IpQiXavlekgUkoMY55I96KcK_vUoClR5uCQ4Y4laa90"></drupal-render-placeholder> </section> Wed, 19 Nov 2014 13:16:42 +0000 Hoti 13 at https://tech.feedyourhead.at