how to use plugins: loadlogs.pl

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
jcnb
Posts: 9
Joined: Wed Jun 13, 2012 5:31 am

how to use plugins: loadlogs.pl

Post by jcnb »

what do I do with the files and loadconfig.pl loadlogs.pl? I need a tip on how to use these plugins.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: how to use plugins: loadlogs.pl

Post by slansing »

Where did you get these plugins from? From what I know loadconfig.pl is a SQL loader. But you should check with whoever created the plugin, alternatively they may have a help flag on the plugin, try running the plugin with --help at the end.
jcnb
Posts: 9
Joined: Wed Jun 13, 2012 5:31 am

Re: how to use plugins: loadlogs.pl

Post by jcnb »

The plugin loads the configuration information and the state in a database. There are two scripts: loadconfig.pl and loadlogs.pl. But I have not found enough information to configure them.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: how to use plugins: loadlogs.pl

Post by sreinhardt »

As slansing mentioned, could you link to where you found loadlogs.pl or is this a part of nagDB per your other post? Have you tried executing them with a -h or --help flag?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
jcnb
Posts: 9
Joined: Wed Jun 13, 2012 5:31 am

Re: how to use plugins: loadlogs.pl

Post by jcnb »

Thanks sreinhardt,

In the case of NAGDB plugin, I put the script nagcgi.py into the directory /nagios/libexec and my dificudade is on how to create a schema for use nagdb. Regarding the scripts loadconfig.pl and loadlogs.pl, command line options (- help) are very vague.
http://exchange.nagios.org/directory/Ad ... er/details.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: how to use plugins: loadlogs.pl

Post by slansing »

The following is a quote from the exchange page:
This is a first version, so no instructions other than the built-in help text. Set up a mysql database and user, configure the scripts, and it should be clear.
Beyond what is in the help file more information could possibly be found on the creators forum located at:

http://exchange.nagios.org/directory/Ad ... er/details

Have you installed the cpan perl module:

Code: Select all

Nagios::Config
as noted in the exchange post?
jcnb
Posts: 9
Joined: Wed Jun 13, 2012 5:31 am

Re: how to use plugins: loadlogs.pl

Post by jcnb »

Thank you!

I had problem trying to install Perl modules (DBI, DBD :: mysql and Nagios::Config) on a 32bit architecture, but I was able to install Perl modules in a 64bit architecture.

The plugin is fairly simple. I downloaded it and applied chmod +x to make it executable. So I went to the forum Steve Shipway (creator of the plugin) and obtained the necessary tips.

What I did:

1. I created a database called Nagios.
2. Loadlog.pl configured with the credentials of the database (address of the Nagios server, DB, password, etc).
3. Ran the loadlog.pl pointing to the log files. The pluging created the following tables: loaded, logs, recordtype, logsummary, LogEvents).
4.At the command line:

Code: Select all

#loadlolgs.pl -T /usr/local/nagios/var/archive/*.log
5. Then again ran loadlogs.pl used the-t option (load all kinds of information) with the-f option to force reload the same log file.

However, the information provided by the plugin loadlog.pl does not meet my needs. I am interested in putting state information and performance of hosts and services in a database. I would like to manipulate the information provided by reporting option Nagios (event start time, end time event, event durantion, event/state type, event/state information) in a different way. Do you have any idea how I can do this?


The forum Steve: http://www.steveshipway.org/forum/viewforum.php?f=20
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: how to use plugins: loadlogs.pl

Post by sreinhardt »

It sounds like you should be looking at something like Nagios XI, with the performance counters and statistics built in, as well as report generation and state change consideration. Otherwise this might be something that you end up having to write if there is nothing else out there.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked