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::Object::Config(3pm)				User Contributed Perl Documentation			       Nagios::Object::Config(3pm)

NAME
Nagios::Object::Config - Perl objects to represent Nagios configuration DESCRIPTION
This is a module for parsing and processing Nagios object configuration files into perl objects. METHODS
new() Create a new configuration object. If Version is not specified, the already weak validation will be weakened further to allow mixing of Nagios 1.0 and 2.0 configurations. For now, the minor numbers of Version are ignored. Do not specify any letters as in '2.0a1'. To enable regular expression matching, use either the "regexp_matching" or "true_regexp_matching" arguments to new(). See enable_regexp_matching() and enable_true_regexp_matching() below. my $objects = Nagios::Object::Config->new(); my $objects = Nagios::Object::Config->new( Version => 1.2 ); my $objects = Nagios::Object::Config->new( Version => 2.0, regexp_matching => 1, true_regexp_matching => 2 ); parse() Parse a nagios object configuration file into memory. Although Nagios::Objects will be created, they are not really usable until the register() method is called. $parser->parse( "myfile.cfg" ); find_object() Search through the list of objects' names and return the first match. The second argument is optional. Always using it can considerably reduce the size of the list to be searched, so it is recommended. my $object = $parser->find_object( "localhost" ); my $object = $parser->find_object( "oracle", "Nagios::Service" ); find_objects() Search through the list of objects' names and return all the matches. The second argument is required. my @object_list = $parser->find_objects( "load", "Nagios::Service" ); find_objects_by_regex() Search through the list of objects' names and return a list of matches. The first argument will be evaluated as a regular expression. The second argument is required and specifies what kind of object to search for. The regular expressions are created by translating the "*" to ".*?" and "?" to ".". For now (v0.9), this code completely ignores Nagios's use_regexp_matching and use_true_regexp_matching and does full RE matching all the time. my @objects = $parser->find_objects_by_regex( "switch_*", "Nagios::Host" ); my @objects = $parser->find_objects_by_regex( "server0?", "Nagios::Host" ); all_objects_for_type() Obtain a reference to all objects of the specified Nagios object type. Usage: $objects = all_objects_for_type($object_type) Parameters: $object_type - A specific Nagios object type, i.e. "Nagios::Contact".. Returns: A reference to an array of references to all objects of the specified type associated with this configuration. Objects of this type added to the configuration following the call to this method _will_ be accessible through this reference after the fact. Note that the array reference by the return value may be empty. Example: my $contacts = $config->all_objects_for_type("Nagios::Contact"); if (scalar(@$contacts) == 0) { print "No contacts have yet been defined "; } else { foreach $contact (@$contacts) { ... } } all_objects() Returns an arrayref with all objects parsed from the config in it. my $everything = $config->all_objects; find_attribute() Search through the objects parsed thus far, looking for a particular textual name. When found, return that object. If called with two arguments, it will search through all objects currently loaded until a match is found. A third argument may specify the type of object to search for, which may speed up the search considerably. my $object = $parser->find_attribute( "command_name", "check_host_alive" ); my $object = $parser->find_attribute( "command_name", "check_host_alive", 'Nagios::Host' ); resolve() Resolve the template for the specified object. Templates will not work until this has been done. $parser->resolve( $object ); register() Examine all attributes of an object and link all of it's references to other Nagios objects to their respective perl objects. If this isn't called, some methods will return the textual name instead of a perl object. $parser->register( $host_object ); my $timeperiod_object = $host_object->notification_period; resolve_objects() Resolve all objects currently loaded into memory. This can be called any number of times without corruption. $parser->resolve_objects(); register_objects() Same deal as resolve_objects(), but as you'd guess, it registers all objects currently loaded into memory. $parser->register_objects(); enable_regexp_matching()/disable_regexp_matching() This correlates to the "use_regexp_matching" option in nagios.cfg. When this option is enabled, Nagios::Object::Config will translate "*" to ".*?" and "?" to "." and evaluate the result as a perl RE, anchored at both ends for any value that can point to multiple other objects (^ and $ are added to either end). $parser->enable_regexp_matching; $parser->disable_regexp_matching; enable_true_regexp_matching()/disable_true_regexp_matching() This correlates to the "use_true_regexp_matching" option in nagios.cfg. This is very similar to the enable_regexp_matching() option, but matches more data and allows more powerful RE syntax. These modules will allow you the full power of perl RE's - this is probably more than is available in Nagios, so don't blame me if something works here but not in Nagios (it's usually the other way around anyways). The generated RE's have the same translation as above, but do not have the anchors to ^ and $. This option always supercedes enable_regexp_matching. $parser->enable_true_regexp_matching; $parser->disable_true_regexp_matching; list_hosts(), list_hostgroups(), etc. Returns an array/arrayref of objects of the given type. $config->list_hosts $config->list_hostgroups $config->list_services $config->list_timeperiods $config->list_commands $config->list_contacts $config->list_contactgroups $config->list_hostdependencies $config->list_servicedependencies $config->list_hostescalations $config->list_hostgroupescalations $config->list_serviceescalations $config->list_servicegroups $config->list_hostextinfo $config->list_serviceextinfo AUTHOR
Al Tobey <tobeya@cpan.org> Contributions From: Lynne Lawrence (API & bugs) perl v5.12.4 2011-10-22 Nagios::Object::Config(3pm)