10 More Discussions You Might Find Interesting
1. Infrastructure Monitoring
Hello,
I am trying to get correct syntax to monitoring process running on windows server using CheckProcState. when i am trying below command whether notepad.exe running or not. its showing process running.
Could you please provide me correct syantx.
/usr/local/nagios/libexec/check_nrpe -H... (0 Replies)
Discussion started by: ghpradeep
0 Replies
2. AIX
Hi,
is any one using nagios monitoring solution on AIX ? if yes, is it supported on AIX 7.1 TL 03 as well ?
I tried to search online and unix.com , could not find it.
Thank you (5 Replies)
Discussion started by: aaron8667
5 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I want to setup Nagios with service Memcache...We have Amazon Cloud..Please help me to setup this service on my Nagios Client.
How to check Memcache is working or not on my server??
1. Please provide us the command defination to set on Nagios Server for .cfg file.
2.Please provide... (1 Reply)
Discussion started by: chetan
1 Replies
4. Infrastructure Monitoring
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
5. Infrastructure Monitoring
Hello,
What would be the best way to monitor a vmware server through a Draytek firewall using Nagios?
I'm quite new to nagios and any help would be greatly appreciated.
Also I have been trying to monitor my Windows 2003 server using nagios, I am not having much luck. I tried to use this guide:... (2 Replies)
Discussion started by: Jethro
2 Replies
6. Red Hat
Hello,
I installed Nagios on the Centreon Platform <----"Centralized monitoring platform" anyways now every time i click on any of the tabs inside centreon interface, it gives me a Blank page, i have no idea what to do. i thought of resetting nagios to an earlier time when it was running... (2 Replies)
Discussion started by: waelkd
2 Replies
7. Infrastructure Monitoring
Hi all,
I am not being able to monitor CPU of freeBSD machine from my CentOS server. I have used check_aix_cpu but always gives garbage value, seems wrong in scripting. i want to monitor CPU usage of my freeBSD machine from my centOS
server. I am able to monitor many services of that machine... (0 Replies)
Discussion started by: gsuwal
0 Replies
8. Infrastructure Monitoring
Hi, I have configured check_snmp plugin and using the plugin i am able to monitor the uptime of the switch.
But the following fails
# /usr/local/nagios/libexec/check_snmp -H 10.10.10.1 -C ready -o ifOperStatus.1 -r 1 -m RFC1213-MIB
SNMP CRITICAL - *down(2)* |
#
Any suggestions ? (1 Reply)
Discussion started by: uxadmin007
1 Replies
9. Infrastructure Monitoring
All,
Looking for a nagios plugin which can do the monitoring of a file which has a value and alert if the value in the file goes more than 100 or so.
Any help is appreciated. (0 Replies)
Discussion started by: uxadmin007
0 Replies
10. Infrastructure Monitoring
Nagios is a free, open source enterprise-class network and server monitoring system that can benefit your IT infrastructure. Bill Bradford describes how to install and set up Nagios on a Solaris 10 system. For this example Bill uses Solaris 10 update 6 running in 32-bit mode on a VMware virtual... (0 Replies)
Discussion started by: Linux Bot
0 Replies
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)