Error While retriving Host details from Nagios


 
Thread Tools Search this Thread
Operating Systems Linux Error While retriving Host details from Nagios
# 1  
Old 02-09-2006
Error While retriving Host details from Nagios

Whoops!

Error: Could not read object configuration data!

Here are some things you should check in order to resolve this error:

1. Verify configuration options using the -v command-line option to check for errors.
2. Check the Nagios log file for messages relating to startup or status data errors.
3. Make sure you've compiled the main program and the CGIs to use the same object data storage options (i.e. default text file or template-based file).
I've got the above errors while I was trying to get the Host details from Nagios. can any one help me in this regarding

Thanx in Advance
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Infrastructure Monitoring

(Nagios)printer error on verify...WHY??

Issue: upon running - $ sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg I'm receiving: Error: Could not find any hostgroup matching 'network-printers' (config file '/usr/local/nagios/etc/printers/NC_FrontOffice.cfg', starting on line 10) Error: Failed to process... (2 Replies)
Discussion started by: rgouette
2 Replies

2. Infrastructure Monitoring

Nagios check dependent on second nagios server

We have a dual Nagios server setup. One is setup for internal server monitoring on our LAN, while the second Nagios server is hosted externally and is used for external checks only such as URL and ping checks form the WAN side. I was wondering if there is any way to setup cross dependencies... (1 Reply)
Discussion started by: eugenes18t
1 Replies

3. UNIX for Advanced & Expert Users

Error details in mail

Hi, I have a application that writes log details to a file in a folder. I am trying to write script to send mail to the user whenever the log is appended with "Error" string and details. The user should receive error and error details in mail whenever there is a error in the file. The... (4 Replies)
Discussion started by: maddy26615
4 Replies

4. Infrastructure Monitoring

Nagios Error

Im new to monitoring so i was testing few monitoring tools and I've had this problem with nagios, i downloaded the Nagios XI VM and im using virtualbox to run it and when i reach the GRUB i get this Error 16 : inconsistent file system structure, i have tried troubleshooting the problem but i... (1 Reply)
Discussion started by: HashB
1 Replies

5. UNIX for Dummies Questions & Answers

at -l doesnt give details of the scheduled job. How to get the details?

I have scheduled couple of shell scripts to run using 'at' command. The o/p of at -l is: $ at -l 1320904800.a Thu Nov 10 01:00:00 2011 1320894000.a Wed Nov 9 22:00:00 2011 1320876000.a Wed Nov 9 17:00:00 2011 $ uname -a SunOS dc2prcrptetl2 5.9 Generic_122300-54 sun4u sparc... (2 Replies)
Discussion started by: superparticle
2 Replies

6. Shell Programming and Scripting

Retriving the first line of data from the listing

Hi All, I have a problem of retrieving the first line of data from the listing i got back from this command : ls -l * | awk '{print $9}' | awk -F. '{print $3}' | sort -g the files names are in the folder are like month.dat.201010210400 day.dat.201010210401 year.dat.201010210402 ... (2 Replies)
Discussion started by: chipmuns
2 Replies

7. Infrastructure Monitoring

configure nrpe and nagios error

   (1)check the service of nrpe   # libexec/check_nrpe -H 59.26.240.63   NRPE v2.8.1    (2)check the resource of nrpe's host   # libexec/check_nrpe -H 59.26.240.63 -c check_df   DISK OK - free space: / 8241 MB (77% inode=98%); /var 5239 MB (95% inode=99%); /usr 11971 MB (86%... (0 Replies)
Discussion started by: zhengsenlin
0 Replies

8. Infrastructure Monitoring

Nagios - NRPE configuration error

HI guyz, I have a nagios 3.0.6 server which is running on fedora 5. I had already added some windows clients and monitoring it. Now i want to add a unix client. Steps done till now : - 1.nagios-plugins-1.4.13 was installed and configured. 2.unzipped and untarred the NRPE 2.8 3.I gave a... (0 Replies)
Discussion started by: Renjesh
0 Replies

9. Shell Programming and Scripting

retriving a value from a variable

Hi all, I need to retrive a value from a variable like so temp1=test1 temp2=test2 num=2 while do pingvar=eval echo \$temp$num echo $pingvar let num=$num-1 done in the "echo $pingvar" i get $temp2 and $temp1 but, I need to get the values of temp2 and temp1 which are test1 and... (2 Replies)
Discussion started by: afadaghi
2 Replies
Login or Register to Ask a Question
Nagios::Plugin(3pm)					User Contributed Perl Documentation				       Nagios::Plugin(3pm)

NAME
Nagios::Plugin - A family of perl modules to streamline writing Nagios plugins SYNOPSIS
# Constants OK, WARNING, CRITICAL, and UNKNOWN are exported by default # See also Nagios::Plugin::Functions for a functional interface use Nagios::Plugin; # Constructor $np = Nagios::Plugin->new; # OR $np = Nagios::Plugin->new( shortname => "PAGESIZE" ); # OR # use Nagios::Plugin::Getopt to process the @ARGV command line options: # --verbose, --help, --usage, --timeout and --host are defined automatically. $np = Nagios::Plugin->new( usage => "Usage: %s [ -v|--verbose ] [-H <host>] [-t <timeout>] " . "[ -c|--critical=<threshold> ] [ -w|--warning=<threshold> ]", ); # add valid command line options and build them into your usage/help documentation. $np->add_arg( spec => 'warning|w=s', help => '-w, --warning=INTEGER:INTEGER . See ' . 'http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT ' . 'for the threshold format. ', ); # Parse @ARGV and process standard arguments (e.g. usage, help, version) $np->getopts; # Exit/return value methods - nagios_exit( CODE, MESSAGE ), # nagios_die( MESSAGE, [CODE]) $page = retrieve_page($page1) or $np->nagios_exit( UNKNOWN, "Could not retrieve page" ); # Return code: 3; # output: PAGESIZE UNKNOWN - Could not retrieve page test_page($page) or $np->nagios_exit( CRITICAL, "Bad page found" ); # nagios_die() is just like nagios_exit(), but return code defaults # to UNKNOWN $page = retrieve_page($page2) or $np->nagios_die( "Could not retrieve page" ); # Return code: 3; # output: PAGESIZE UNKNOWN - Could not retrieve page # Threshold methods $code = $np->check_threshold( check => $value, warning => $warning_threshold, critical => $critical_threshold, ); $np->nagios_exit( $code, "Threshold check failed" ) if $code != OK; # Message methods (EXPERIMENTAL AND SUBJECT TO CHANGE) - # add_message( CODE, $message ); check_messages() for (@collection) { if (m/Error/) { $np->add_message( CRITICAL, $_ ); } else { $np->add_message( OK, $_ ); } } ($code, $message) = $np->check_messages(); nagios_exit( $code, $message ); # If any items in collection matched m/Error/, returns CRITICAL and # the joined set of Error messages; otherwise returns OK and the # joined set of ok messages # Perfdata methods $np->add_perfdata( label => "size", value => $value, uom => "kB", threshold => $threshold, ); $np->add_perfdata( label => "time", ... ); $np->nagios_exit( OK, "page size at http://... was ${value}kB" ); # Return code: 0; # output: PAGESIZE OK - page size at http://... was 36kB # | size=36kB;10:25;25: time=... DESCRIPTION
Nagios::Plugin and its associated Nagios::Plugin::* modules are a family of perl modules to streamline writing Nagios plugins. The main end user modules are Nagios::Plugin, providing an object-oriented interface to the entire Nagios::Plugin::* collection, and Nagios::Plugin::Functions, providing a simpler functional interface to a useful subset of the available functionality. The purpose of the collection is to make it as simple as possible for developers to create plugins that conform the Nagios Plugin guidelines (http://nagiosplug.sourceforge.net/developer-guidelines.html). EXPORTS Nagios status code constants are exported by default: OK WARNING CRITICAL UNKNOWN DEPENDENT The following variables are also exported on request: %ERRORS A hash mapping error strings ("CRITICAL", "UNKNOWN", etc.) to the corresponding status code. %STATUS_TEXT A hash mapping status code constants (OK, WARNING, CRITICAL, etc.) to the corresponding error string ("OK", "WARNING, "CRITICAL", etc.) i.e. the reverse of %ERRORS. CONSTRUCTOR Nagios::Plugin->new; Nagios::Plugin->new( shortname => 'PAGESIZE' ); Nagios::Plugin->new( usage => "Usage: %s [ -v|--verbose ] [-H <host>] [-t <timeout>] [ -c|--critical=<critical threshold> ] [ -w|--warning=<warning threshold> ] ", version => $VERSION, blurb => $blurb, extra => $extra, url => $url, license => $license, plugin => basename $0, timeout => 15, ); Instantiates a new Nagios::Plugin object. Accepts the following named arguments: shortname The 'shortname' for this plugin, used as the first token in the plugin output by the various exit methods. Default: uc basename $0. usage ("Usage: %s --foo --bar") Passing a value for the usage() argument makes Nagios::Plugin instantiate its own "Nagios::Plugin::Getopt" object so you can start doing command line argument processing. See "CONSTRUCTOR" in Nagios::Plugin::Getopt for more about "usage" and the following options: version url blurb license extra plugin timeout OPTION HANDLING METHODS "Nagios::Plugin" provides these methods for accessing the functionality in "Nagios::Plugin::Getopt". add_arg Examples: # Define --hello argument (named parameters) $plugin->add_arg( spec => 'hello=s', help => "--hello Hello string", required => 1, ); # Define --hello argument (positional parameters) # Parameter order is 'spec', 'help', 'default', 'required?' $plugin->add_arg('hello=s', "--hello Hello string", undef, 1); See "ARGUMENTS" in Nagios::Plugin::Getopt for more details. getopts() Parses and processes the command line options you've defined, automatically doing the right thing with help/usage/version arguments. See "GETOPTS" in Nagios::Plugin::Getopt for more details. opts() Assuming you've instantiated it by passing 'usage' to new(), opts() returns the Nagios::Plugin object's "Nagios::Plugin::Getopt" object, with which you can do lots of great things. E.g. if ( $plugin->opts->verbose ) { print "yah yah YAH YAH YAH!!!"; } # start counting down to timeout alarm $plugin->opts->timeout; your_long_check_step_that_might_time_out(); # access any of your custom command line options, # assuming you've done these steps above: # $plugin->add_arg('my_argument=s', '--my_argument [STRING]'); # $plugin->getopts; print $plugin->opts->my_argument; Again, see Nagios::Plugin::Getopt. EXIT METHODS nagios_exit( <CODE>, $message ) Exit with return code CODE, and a standard nagios message of the form "SHORTNAME CODE - $message". nagios_die( $message, [<CODE>] ) Same as nagios_exit(), except that CODE is optional, defaulting to UNKNOWN. NOTE: exceptions are not raised by default to calling code. Set $_use_die flag if this functionality is required (see test code). die( $message, [<CODE>] ) Alias for nagios_die(). Deprecated. max_state, max_state_alt These are wrapper function for Nagios::Plugin::Functions::max_state and Nagios::Plugin::Functions::max_state_alt. THRESHOLD METHODS These provide a top level interface to the "Nagios::Plugin::Threshold" module; for more details, see Nagios::Plugin::Threshold and Nagios::Plugin::Range. check_threshold( $value ) check_threshold( check => $value, warning => $warn, critical => $crit ) Evaluates $value against the thresholds and returns OK, CRITICAL, or WARNING constant. The thresholds may be: 1. explicitly set by passing 'warning' and/or 'critical' parameters to "check_threshold()", or, 2. explicitly set by calling "set_thresholds()" before "check_threshold()", or, 3. implicitly set by command-line parameters -w, -c, --critical or --warning, if you have run "$plugin->getopts()". You can specify $value as an array of values and each will be checked against the thresholds. The return value is ready to pass to C <nagios_exit>, e . g ., $p->nagios_exit( return_code => $p->check_threshold($result), message => " sample result was $result" ); set_thresholds(warning => "10:25", critical => "~:25") Sets the acceptable ranges and creates the plugin's Nagios::Plugins::Threshold object. See http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT for details and examples of the threshold format. threshold() Returns the object's "Nagios::Plugin::Threshold" object, if it has been defined by calling set_thresholds(). You can pass a new Threshold object to it to replace the old one too, but you shouldn't need to do that from a plugin script. MESSAGE METHODS EXPERIMENTAL AND SUBJECT TO CHANGE add_messages and check_messages are higher-level convenience methods to add and then check a set of messages, returning an appropriate return code and/or result message. They are equivalent to maintaining a set of @critical, @warning, and and @ok message arrays (add_message), and then doing a final if test (check_messages) like this: if (@critical) { nagios_exit( CRITICAL, join(' ', @critical) ); } elsif (@warning) { nagios_exit( WARNING, join(' ', @warning) ); } else { nagios_exit( OK, join(' ', @ok) ); } add_message( <CODE>, $message ) Add a message with CODE status to the object. May be called multiple times. The messages added are checked by check_messages, following. Only CRITICAL, WARNING, and OK are accepted as valid codes. check_messages() Check the current set of messages and return an appropriate nagios return code and/or a result message. In scalar context, returns only a return code; in list context returns both a return code and an output message, suitable for passing directly to nagios_exit() e.g. $code = $np->check_messages; ($code, $message) = $np->check_messages; check_messages returns CRITICAL if any critical messages are found, WARNING if any warning messages are found, and OK otherwise. The message returned in list context defaults to the joined set of error messages; this may be customised using the arguments below. check_messages accepts the following named arguments (none are required): join => SCALAR A string used to join the relevant array to generate the message string returned in list context i.e. if the 'critical' array @crit is non-empty, check_messages would return: join( $join, @crit ) as the result message. Default: ' ' (space). join_all => SCALAR By default, only one set of messages are joined and returned in the result message i.e. if the result is CRITICAL, only the 'critical' messages are included in the result; if WARNING, only the 'warning' messages are included; if OK, the 'ok' messages are included (if supplied) i.e. the default is to return an 'errors-only' type message. If join_all is supplied, however, it will be used as a string to join the resultant critical, warning, and ok messages together i.e. all messages are joined and returned. critical => ARRAYREF Additional critical messages to supplement any passed in via add_message(). warning => ARRAYREF Additional warning messages to supplement any passed in via add_message(). ok => ARRAYREF | SCALAR Additional ok messages to supplement any passed in via add_message(). PERFORMANCE DATA METHODS add_perfdata( label => "size", value => $value, uom => "kB", threshold => $threshold ) Add a set of performance data to the object. May be called multiple times. The performance data is included in the standard plugin output messages by the various exit methods. See the Nagios::Plugin::Performance documentation for more information on performance data and the various field definitions, as well as the relevant section of the Nagios Plugin guidelines (http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN202). EXAMPLES
"Enough talk! Show me some examples!" See the file 'check_stuff.pl' in the 't' directory included with the Nagios::Plugin distribution for a complete working example of a plugin script. VERSIONING
The Nagios::Plugin::* modules are currently experimental and so the interfaces may change up until Nagios::Plugin hits version 1.0, although every attempt will be made to keep them as backwards compatible as possible. SEE ALSO
See Nagios::Plugin::Functions for a simple functional interface to a subset of the available Nagios::Plugin functionality. See also Nagios::Plugin::Getopt, Nagios::Plugin::Range, Nagios::Plugin::Performance, Nagios::Plugin::Range, and Nagios::Plugin::Threshold. The Nagios Plugin project page is at http://nagiosplug.sourceforge.net. BUGS
Please report bugs in these modules to the Nagios Plugin development team: nagiosplug-devel@lists.sourceforge.net. AUTHOR
Maintained by the Nagios Plugin development team - http://nagiosplug.sourceforge.net. Originally by Ton Voon, <ton.voon@altinity.com>. COPYRIGHT AND LICENSE
Copyright (C) 2006 by Nagios Plugin Development Team This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available. perl v5.14.2 2011-12-23 Nagios::Plugin(3pm)