<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="Tiki CMS/Groupware via FeedCreator 1.7.2" -->
<?xml-stylesheet href="http://www.perfparse.de/lib/rss/rss-style.css" type="text/css"?>
<?xml-stylesheet href="http://www.perfparse.de/lib/rss/rss20.xsl" type="text/xsl"?>
<rss version="2.0">
    <channel>
        <title>Tiki RSS feed for forums</title>
        <description></description>
        <link>http://www.perfparse.de/tiki-forums_rss.php?ver=2</link>
        <lastBuildDate>Tue, 07 Sep 2010 20:31:16 +0100</lastBuildDate>
        <generator>Tiki CMS/Groupware via FeedCreator 1.7.2</generator>
        <image>
            <url>http://www.perfparse.de/img/tiki.jpg</url>
            <title>tikiwiki logo</title>
            <link>http://www.perfparse.de/tiki-index.php</link>
            <description><![CDATA[Feed provided by http://www.perfparse.de/tiki-index.php. Click to visit.]]></description>
        </image>
        <language>en-us</language>
        <item>
            <title>automaten spiele</title>
            <link>http://www.perfparse.de/tiki-view_forum_thread.php?forumId=1&amp;comments_parentId=105</link>
            <description><![CDATA[If you are interested in this topic just click the link [http://www.casino-spielen.biz/spielautomat/|automaten spiele] for more details and information or reply to this message.]]></description>
            <author>SueSmith</author>
            <pubDate>Thu, 01 Jul 2010 20:00:26 +0100</pubDate>
        </item>
        <item>
            <title>Step by Step installation guide - Nagios Invokes Perfparse Method</title>
            <link>http://www.perfparse.de/tiki-view_forum_thread.php?forumId=1&amp;comments_parentId=102</link>
            <description><![CDATA[Hi all!  I've been using Perfparse for several years now, so I've become intimately familiar with how painful it can be to get it configured and running properly.  It's a great tool, but the documentation for the project is old, and often poorly formatted or lacking detail.  I wanted to add this as a guide within the Wiki, but for now I will settle for posting it here in the forums.  Perhaps Redflo can give me permissions to add this as a regular wiki page if it proves to be useful; some markup would really help its readability.

Installation Method:
Nagios invokes Perfparse

Server Environment:
Ubuntu 8.04 Hardy Heron. Kernel - 2.6.24-26-server

Nagios Environment: (compiled manually): 
Nagios 3.2.0
Nagios Plugins 1.4.13
NRPE 2.12

Description:  Perfparse is invoked through a Nagios command which runs perfparse-log2mysql every time a log is generated.

Pros: 
* No delay between detection of data and parsing of data
* Smaller risk of losing performance data

Cons:
* Fork a new process for each line of performance data, which can   slow Nagios
* Nagios and Perfparse are very dependent one upon the other. If one is broken, the other will not work perfectly.

STEP 1: DOWNLOAD & UNPACK PERFPARSE

Obtain the Perfparse source files from the [http://sourceforge.net/projects/perfparse/|SourceForge project page].

Once you've obtained the latest version, unpack it.

Code:
*****************************************************

tar -xvf perfparse-0.106.1.tar.gz

*****************************************************

Step 2. COMPILE PERFPARSE

a.) Now, let's go ahead and configure Perfparse with our desired options.
       Here's what I used for my build:

Code:
*****************************************************

./configure --prefix=/usr/local/nagios --with-image-dir=/usr/local/nagios/share/perfparse/images --with-cgidir=/usr/local/nagios/sbin 
--with-http_image_path=/usr/local/nagios/share/images --with-apache-user=nagios

*****************************************************

and here are the options my Nagios installation was compiled with:

Code:
*****************************************************

--with-nagios-user=nagios --with-nagios-group=nagios --with-command-user=nagiosadmin --with-command-group=nagcmd 
--with-default-perfdata --with-htmurl= --with-cgiurl=/cgi-bin --enable-embedded-perl --with-perlcache

*****************************************************

*Note: You may have noticed my Perfparse cgidir is set to "/" this is because Nagios is located at the root of my web server (hence the "--with-htmurl=" option in my Nagios configuration as well).  If you're not sure, you'll probably want to set your "--with-cgidir" option to "/nagios" (double-check your Nagios install if you're not sure).

b.) Verify your configure settings by paying close attention to the summary once it completes.

It will look something like this:

Configuration options:

Prefix:                       /usr/local/nagios
Perfparse:                    Selected
DB tools:                     Selected
CGI:                          Selected
PHP interface:                Selected

HTTP path for images:         /nagios/images
Installation path for images: ${datadir}/perfparse/images
Installation path for CGIs:   /usr/local/nagios/sbin

Using glib2.0:                2.16.6
Database support:             mysql
Data source:                  Nagios

c.) Ok, our configure options look correct so now it's time to compile and install.

Code:
*****************************************************

sudo make && make install

*****************************************************

That's it! We've unpacked, compiled and installed but there's still more work to be done.  

STEP 3.  COPY EXAMPLE CONFIG FILES TO NAGIOS

*Note: This step may not be necessary as I believe "make install" places copies in your working Nagios directory, but just in case let's run through it.

Now, we'll be copying over the example Perfparse config files to Nagios. For the Nagios invokes Perfparse method, we really only need to worry about, "perfparse.cfg."

(from your unpacked Perfparse dir)

Code:

*****************************************************

cd config/

sudo cp perfparse.cfg.example /usr/local/nagios/etc/perfparse.cfg

*****************************************************

Step 4. CREATE DATABASE & APPLY THE SCHEMA

a.)  Create a database within mySQL (or postgresql), create a user and grant it full access to the new db you created.  For the sake of these instructions, we'll assume our db, user & password are all named, "nagios".

b.)  Ok now that we've set up the blank DB and user, we need to apply the schema so Perfparse can store the performance data it collects from Nagios.  

(again, starting from your unpacked Perfparse dir)

Code:
*****************************************************

cd scripts/

cat mysql_create.sql | mysql -unagios -pnagios -Dnagios

*****************************************************

If you created your DB & user with the same name & password as the example above, you should now see around 18 tables in your DB.

*Note: If you're using postgresql you'll need to use the postgresql_create.sql script.

STEP 5.  ENABLE PERFORMANCE DATA

In order to collect the performance data we need to verify the following settings in the main nagios.cfg file:

Code:
*****************************************************

process_performance_data=1

host_perfdata_command=process-host-perfdata

service_perfdata_command=process-service-perfdata

perfdata_timeout=5

*****************************************************

Now, further down in nagios.cfg let's check the perfdata templates.

If your default templates do not match the examples below, you may need to modify them to match the following:

Code:
*****************************************************

host_perfdata_file_template=[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$

service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$

*****************************************************

*Note: The URL markup in the forum is mangling the command definitions above.  Make sure the "HOSTPERFDATA" & "SERVICEPERFDATA" strings are enclosed in brackets.

IMPORTANT NOTE:
If you're using the newer nagios-plugins builds (most likely), the default templates for the performance data in nagios.cfg are probably incorrect.  This will cause the performance data to be written incorrectly and Perfparse will insert junk into your db.  While this doesn't necessarily break anything, it's not what we want.  So double check these settings! This is a common mistake people make when configuring Perfparse.

Step 6.  CREATE NAGIOS COMMANDS TO INVOKE PERFPARSE

Next, we need to change a couple more settings in perfparse.cfg and misccommands.cfg and then we're off to the races! 

a.) First, modify your misccommands.cfg file and add the following:

*Note (make sure that you first comment out or replace the default nagios "process-service-hostdata" and "process-host-perfdata" commands with the definitions below).

Code:
*****************************************************

# 'process-service-perfdata' command definition
define command {
command_name process-service-perfdata
command_line /usr/bin/printf "%b" "$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEOUTPUT$\t$SERVICESTATE$\t$SERVICEPERFDATA$\n" | /usr/local/nagios/bin/perfparse-log2mysql -c /usr/local/nagios/etc/perfparse.cfg
}

# 'process-host-perfdata' command definition
define command {
command_name process-host-perfdata
command_line /usr/bin/printf "%b" "$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$HOSTOUTPUT$\t$SERVICESTATE$\t$HOSTPERFDATA$\n" | /usr/local/nagios/bin/perfparse-log2mysql -c /usr/local/nagios/etc/perfparse.cfg

*****************************************************

You can also substitute the path in your definitions with the $USER2$ resource, just ensure you have it properly set to your Perfparse installation directory in resources.cfg.  You'll notice I used the new templates for the printf output in the command definitions too.  Basically this tells Nagios how to output the performance data properly and pipe it to the perfparse-log2mysql command, then into the DB.

Finally, we need to ensure perfparse-log2mysql understands where to look for the data and how to insert it into our DB.

Verify the following settings in your perfparse.cfg file.

Code:
*****************************************************

Service_Log =                "-"


*****************************************************

(remember, we're piping the data from Nagios directly into perfparse-log2mysql so just set the service log location to stdin.)  

Near the bottom, make sure you've defined the proper settings to allow Perfparse to find and connect to the database we created earlier.

Code:
*****************************************************

# Database managment :
# ====================
Use_Storage_Mysql =              "yes"

No_Raw_Data =                    "no"
No_Bin_Data =                    "no"

# Database Authentication
DB_User =                    "nagios"
DB_Name =                    "nagios"
DB_Pass =                    "nagios"
DB_Host =                    "127.0.0.1"

*****************************************************

If you'd like, you can also customize your Perfparse error, drop and output log settings now.

Step 7.  RESTART NAGIOS AND VERIFY PERFPARSE INSTALLATION

The last step is to restart Nagios and check to ensure Perfparse is working properly.

Code:

*****************************************************

sudo /etc/init.d/nagios restart


*****************************************************
Now point your browser to http://servername/cgi-bin/perfparse.cgi and hopefully you will see the Perfparse interface.  As service checks fire off in Nagios, the graphs and raw output in Perfparse should begin updating  automatically.  Congratulations, you've successfully configured Perfparse!

STEP 8. CONCLUSION

The Nagios invokes Perfparse method isn't the most efficient, but it is probably the easiest to configure.  Hopefully this guide will help others save some time.  Please feel free to edit and improve on this guide.  I know I didn't cover everything so Iâ€™d be happy to see refinements, additions and feeback.  It could probably use a brief section on DB maintenance and how to add a link to Perfparse within Nagios, but I'll leave those items for another time.]]></description>
            <author>kukulkan</author>
            <pubDate>Fri, 29 Jan 2010 17:16:35 +0100</pubDate>
        </item>
        <item>
            <title>performance</title>
            <link>http://www.perfparse.de/tiki-view_forum_thread.php?forumId=1&amp;comments_parentId=101</link>
            <description><![CDATA[hi,

i've detected performance issues with lastest code.

anyone have similar issues?

btw, is this project freezed or something? i see little progress here.

]]></description>
            <author>abosch</author>
            <pubDate>Mon, 06 Oct 2008 11:45:47 +0100</pubDate>
        </item>
        <item>
            <title>undefined symbol: iSQLCount'</title>
            <link>http://www.perfparse.de/tiki-view_forum_thread.php?forumId=1&amp;comments_parentId=99</link>
            <description><![CDATA[Hi,

I'm trying to compile perfparse 106.1 with postgres as a backend. While the compile/build seems to be fine, I receive the following error, if I try to start perfparsed:

2007/08/14 18:25:53 [   storage.c:61    19688 ] storage_postgresql module failed to load (msg='/usr/local/nagios/lib/libpp_storage_postgresql.so: undefined symbol: iSQLCount')

Indeed:

nm /usr/local/nagios/lib/libpp_storage_postgresql.so | grep iSQL
    U iSQLCount

BUT (in the build directory):

nm libpp_postgresql/.libs/libpp_postgresql.so | grep iSQL
0000000000106578 B iSQLCount


Any ideas (besides using mysql) ?

Cheers,

Thomas]]></description>
            <author>tschimpke</author>
            <pubDate>Tue, 14 Aug 2007 16:57:05 +0100</pubDate>
        </item>
        <item>
            <title>Deleting Metrics</title>
            <link>http://www.perfparse.de/tiki-view_forum_thread.php?forumId=1&amp;comments_parentId=98</link>
            <description><![CDATA[Hello,

I have some metrics that i don't use anymore so i want to delete them:
I clicked "Administration Menu" > "View / Edit Binary Data Deletion Policy", then at the Deletion Policy-screen i select:
<User Defined> in the dropdown
"Always" radiobutton in the "User Defined Policy"-table.
Then i click "Update Policy", unfortunately after pressing the button the configuration returns to the values before the changes.

What am i doing wrong?
]]></description>
            <author>BramV</author>
            <pubDate>Thu, 10 May 2007 14:43:44 +0100</pubDate>
        </item>
        <item>
            <title>Testpost</title>
            <link>http://www.perfparse.de/tiki-view_forum_thread.php?forumId=1&amp;comments_parentId=90</link>
            <description><![CDATA[Just testing email-forum function. please ignore]]></description>
            <author>redflo</author>
            <pubDate>Mon, 02 Apr 2007 19:51:44 +0100</pubDate>
        </item>
        <item>
            <title>libpp_storage_*.so</title>
            <link>http://www.perfparse.de/tiki-view_forum_thread.php?forumId=1&amp;comments_parentId=88</link>
            <description><![CDATA[I am getting a warning during ./configure that I do not know how to fix.
Here is my ./configure string.
./configure --prefix=/usr/local/nagios --with-imagedir=/usr/local/nagios/share/images/ --with-cgidir=/usr/local/nagios/sbin --with-http_image_path=/nagios/images --with-db=mysql --with-mysql_config_dir=/usr/local/mysql/bin --disable-shared

Here is the warning:
WARNING WARNING WARNING WARNING WARNING WARNING WARNING
Be sure to install libpp_storage_*.so files in a directory
that ld.so knows (/etc/ld.so.conf, run ldconfig if needed,
or $LD_LIBRARY_PATH)

Any ideas what I am missing?]]></description>
            <author>samwe</author>
            <pubDate>Mon, 02 Apr 2007 18:54:45 +0100</pubDate>
        </item>
        <item>
            <title>php_ui installs to eprefix/sbin</title>
            <link>http://www.perfparse.de/tiki-view_forum_thread.php?forumId=1&amp;comments_parentId=87</link>
            <description><![CDATA[Hi,

I don't think this should be the default behaviour. I've been using the --with-cgidir option to configure to not use nagios/sbin.

The PHP UI however, is unaffected. I think in phpgui/Makefile, INST_PHPUI_PATH should not be set to ${exec_prefix}/sbin, but ${INST_CGI_PATH} instead?

Just my two cents..

Regards]]></description>
            <author>illtiz</author>
            <pubDate>Mon, 02 Apr 2007 16:46:54 +0100</pubDate>
        </item>
        <item>
            <title>Archive data</title>
            <link>http://www.perfparse.de/tiki-view_forum_thread.php?forumId=1&amp;comments_parentId=85</link>
            <description><![CDATA[Anyone have any scripts to archive perfparse data?]]></description>
            <author>sqldude</author>
            <pubDate>Wed, 27 Sep 2006 15:46:31 +0100</pubDate>
        </item>
        <item>
            <title>Importing Hosts/Groups</title>
            <link>http://www.perfparse.de/tiki-view_forum_thread.php?forumId=1&amp;comments_parentId=84</link>
            <description><![CDATA[Hello,

I was wondering if there was an easy way to import all the Hosts and HostGroups into perfparse. Am I missing something really fundamental? Or should I just write a quick script that loads nagios' configuration file into perparse's db?

Thanks,
Andrew]]></description>
            <author>yoyo81</author>
            <pubDate>Wed, 27 Sep 2006 03:16:15 +0100</pubDate>
        </item>
    </channel>
</rss>
