Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.206.821 Times

Nagios::Interface 0.01

Company: Sam Vilain
Date Added: November 01, 2013  |  Visits: 440

Nagios::Interface

Report Broken Link
Printer Friendly Version


Product Homepage
Download (35 downloads)



Nagios::Interface is a Perl module for basic run-time interaction with Nagios 3 instances. There are no functions to parse or write configuration files (yet?), but it can parse most logfile messages, as well as write control messages and parse the status file for receipts of actions that did not log anything useful.<br /><br />SYNOPSIS<br /><br /> use Nagios::Interface;<br /><br /> # set up a logfile reader which uses File::Tail<br /> my $logfile = Nagios::Interface::Logfile->new(<br /> tail => File::Tail->new(<br /> name => "/var/log/nagios3/nagios.log",<br /> maxinterval => 5,<br /> interval => 2,<br /> tail => 10,<br /> ),<br /> );<br /><br /> # read a message, parse it and return it<br /> my $log_message = $logfile->get_message;<br /><br /> # or if you get loglines from somewhere else, pass to parse_logline<br /> $log_message = $logfile->parse_logline($_);<br /><br /> # returned messages have roles for commonality and classes for type.<br /> print $log_message->host . " is " .<br /> ($log_message->up ? "UP" : "DOWN");<br /> if $log_message->does("Nagios::Interface::Alert::Host");<br /><br /> # controlling via the nagios control file<br /> my $control = Nagios::Interface::Control->new(<br /> filename => "/var/lib/nagios3/rw/nagios.cmd",<br /> );<br /><br /> # make any kind of log message to issue as a command...<br /> # see Nagios::Interface::ConcreteTypes for a list<br /> my $svc_downtime = Nagios::Interface::ScheduleServiceDowntime->new(<br /> begin => time,<br /> end => time + 15 * 60,<br /> fixed => 1,<br /> author => ($ENV{LOGNAME}||$ENV{USER}||(getpwuid($ "here's a comment",<br /> );<br /> my $entry_time = $control->issue($svc_downtime);<br /><br /> # reading the status log<br /> my $status = Nagios::Interface::Status->new(<br /> filename => "/var/cache/nagios3/status.dat",<br /> );<br /><br /> sleep 1 while ( (stat $status->filename)[9] < $issue_time );<br /> $status->parse_file;<br /><br /> my @blocks = grep {<br /> $_->{entry_time} == $entry_time &&<br /> $_->{comment} eq "here's a comment",<br /> } $status->get_blocks("servicedowntime");<br /><br /> use Set::Object qw(set);<br /> my $downtime_ids = set( map { $_->{downtime_id} } @blocks) );<br /> print "Downtime IDs: $downtime_ids\n";<br /><br /> # now cancel the downtime, to complete the example<br /> $control->issue(<br /> map {<br /> Nagios::Interface::DeleteServiceDowntime->new(<br /> downtime_id => $_<br /> )<br /> } $downtime_ids->members<br /> );[left][/left]

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Blocks Commentquot Control Controlgtissuesvc Downtime Entry Time Filename Issue Log Message Logfile Message Messages Nagiosinterface Nagiosinterfacestatusgtnew Parse Print Quothere Quotvarcachenagios Statusdatquot Reading Status Write
Users rating: 0/10

License: Freeware Size: 30.72 KB
USER REVIEWS
More Reviews or Write Review


NAGIOS::INTERFACE RELATED
ActiveX Components  -  VideoCapFree ActiveX Control 1.0
VideoCapFree is a free ActiveX control that support real time video/web cam preview. It will automatically recognizes most WDM compliant video sources installed on a pc.
1.77 MB  
File Security  -  PINoptic Secure Storage 2.1
PINoptic Secured Storage uses the patented security access control called a One Time Visual Probablistic password (OTP) combined with industrial and military grade encryption to keep your private content private to you or those you choose to share...
1.3 MB  
Firewalls  -  Norton Personal Firewall 2004
Symantec’s Norton Personal Firewall 2004 keeps hackers out and personal data in. Malicious Internet users are constantly looking for new ways to take control of your PC or steal your private information. Norton Personal Firewall works on...
20.12 MB  
Home & Leisure  -  SpeakerSetup 1.0
SpeakerSetup is a command line utility that can change speaker mode without going to the control panel all the time. Ideal for gamers and htpc addicts for changing speaker mode with a shortcut and a hotkey. Speaker Mode can be one of the...
64 KB  
Programming  -  Java + information flow 3.0
Java + information flow (Jif in short) is a security-typed programming language that extends Java with support for information flow control and access control, both at compile time and at run time. The source code for the Jif compiler and...
 
Programming  -  OfficeFloor 1.0
OfficeFloor is true inversion of control for building real-time web applications that are build once run anywhere - even with Cloud Computing. In addition to making it simple to build a Java web application, once built OfficeFloor enables the...
6.51 MB  
Action Games  -  Zoi the Escape 1.0
Are you a good jumper? Then show it to us! In this game you will have to jump over a lot of obstacles, like different blocks. Try to do it in time, otherwise you will be killed! So, if you are ready let's do it immediately!
824.62 KB  
Anti-SPAM Tools  -  DeSofto SpamFilter LITE 2.56
SpamFilter automatically checks incoming messages and filters unwanted, dangerous, or offensive mail messages to save your time from manually detecting and organizing mail messages. An unique neuro-algorithm has been used in SpamFilter product to...
2.44 MB  
Development Tools  -  Application OF Block Simulink To Cardiac PDE VI1 1.0
It is application of of Simulink Block to Cardiac PDE VI1 system of 2 non linear coupled equations of PDE and try to design solution with dicretized space and time and issue in 1D.I associate a Doc file to introduction theory.Just see this page...
10 KB  
Modules  -  Enforce revision log message 6.x-1.0-beta3
This module allows to force a set of users to write a revision log message every time they edit a node, helping administrators to track modifications.If you have several editors for your website's content (like on a wiki site), it's probable...
10 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB