PDA

View Full Version : Graphs ... Graphs ... Graphs - help


parvinderb
18th May 2006, 11:35
Hi,

Having problems graphing services. Whenever i click on the graph icon from the service detail page i get :

Problem with Perfparse Database connection : DB Error: connect failed

Can someone please shed some light on this???

Also, I don't know if i am even using the right checks to get the graph data. Can someone please explain how to get graphs going from scratch? by scratch i mean for a HOST that you are just checking pings .

Any Help is much appreciated :)

Thanks
Parvinder Bhasin

rom
18th May 2006, 13:29
Hi, for graph with perfparse.

- Install perfparse.
- Check "yes" in oreon->options->general opt-> using perfparse
- Configure oreon->configuration->nagios->perfparse cfg
- Use plugins compatible with perfparse -> http://wiki.perfparse.org/tiki-view_faq.php?faqId=6
- Generate
- Check that value are correctly put in perfparse database
- Wait for a moment
- Enjoy your graphs

:lol:

parvinderb
23rd May 2006, 22:06
Still can't get this working.. :(

Do i have to create the PERFPARSE database???? or do i use OREON??

If i have to create my own, what tables etc do i have to create?

Any help...highly appreciated.

Thanks
Parvinder Bhasin

rom
23rd May 2006, 23:08
Well, install perfparse and you'll find the DB script in :
/perfparse-0.105.6/scripts/

mdemsar
8th June 2006, 17:49
Hello!

I did everything in this post and I get no errors. But I get no graph either :(

Any ideas, please?

In attachment is the screen I get when I click "Simple Graphs Renderer".

rom
8th June 2006, 17:53
Check that there's value in perfparse DB. (it's not the case I think..)

mdemsar
9th June 2006, 08:46
You are correct, there is no value.
I think it might be because of order of actions I performed:
1. Install Nagios
2. Install Oreon
3. Install perfparse&config

I will try now to remove Oreon and reinstall it, maybe perfparse will start working.

rom
9th June 2006, 09:22
for a perfparse problem, no need to reinstall Oreon, it's not the problem.

1 - Install Perfparse and be sure at the end you have this kind of file in /usr/local/nagios/bin (in case you use --prefix=/usr/local/nagios for the ./configure)

# ll
total 272
-rwxr-xr-x 1 root root 20140 avr 27 18:45 check_perfparse_version
-rwxr-xr-x 1 root root 74514 avr 27 18:45 perfparsed
-rwxr-xr-x 1 root root 63031 avr 27 18:45 perfparse-db-purge
-rwxr-xr-x 1 root root 44587 avr 27 18:45 perfparse-db-tool
-rwxr-xr-x 1 root root 54056 avr 27 18:45 perfparse-log2any
lrwxrwxrwx 1 root root 17 avr 27 18:45 perfparse-log2file_output -> perfparse-log2any
lrwxrwxrwx 1 root root 17 avr 27 18:45 perfparse-log2gnuplot -> perfparse-log2any
lrwxrwxrwx 1 root root 17 avr 27 18:45 perfparse-log2mysql -> perfparse-log2any
lrwxrwxrwx 1 root root 17 avr 27 18:45 perfparse-log2socket_output -> perfparse-log2any
lrwxrwxrwx 1 root root 17 avr 27 18:45 perfparse-log2stdout -> perfparse-log2any

2 - Configure Nagios.cfg in Oreon to enable "Performance Data Processing Option" and select a command for the "Service Performance Data Processing Command" like process-service-perfdata

Good luck.

mdemsar
9th June 2006, 13:05
Thank you!
That's what I needed. But it started working in the morning after a reinstall of Oreon. It doesn't seem logical, but apparently Oreon didn't recognize perfparse, when it was installed after Oreon. Your post should go in documentation somewhere. It's useful.

mdemsar
12th June 2006, 14:53
My graphs stopped working. The problem is, that perfparse is not putting anything into database. I selected the method, where nagios calls perfparse to put values in DB and enabled the rewuired settings:
process_performance_data=1 and selected the command for it: process_service_perfdata. Nothing is in my database. Do I have to do anything else?

julio
12th June 2006, 16:02
Hi

do you have messages aboute perfdata in your nagios logs ?

mdemsar
12th June 2006, 16:39
My nagios configuration in the database cannot be changed. When I change any option, the result isn't in the database.

Over the weekend I received errors for each time the process-service-perfdata command was run. The errors were because of bad path, but I don't know why. I wrote the command so that there were no macros and still, the command looked like:
$USER1$/bin/perfdata_log2mysql or /usr/local/nagios/libexec//bin/perfdata_log2mysql

I couldn't get the command to run properly. I have database on a separate/remote server, but it's working ok.

julio
12th June 2006, 16:52
hooo strange... can you give us a db structure of your cfg_nagios table ?

Thanks..

mdemsar
13th June 2006, 10:25
This is my table structure. I think that yesterday something must have been wrong with my setup. I repeated it and it seems OK now.

Sorry for not attaching a file, but it doesn't work from my location.

-- phpMyAdmin SQL Dump
-- version 2.8.0.3
-- http://www.phpmyadmin.net
--
-- Host: kikimora.local.lj-mlek.si
-- Generation Time: Jun 13, 2006 at 09:20 AM
-- Server version: 4.1.20
-- PHP Version: 4.3.4
--
-- Database: `oreondb`
--

-- --------------------------------------------------------

--
-- Table structure for table `cfg_nagios`
--

CREATE TABLE `cfg_nagios` (
`nagios_id` int(11) NOT NULL auto_increment,
`nagios_name` varchar(255) default NULL,
`log_file` varchar(255) default NULL,
`cfg_dir` varchar(255) default NULL,
`object_cache_file` varchar(255) default NULL,
`temp_file` varchar(255) default NULL,
`status_file` varchar(255) default NULL,
`p1_file` varchar(255) default NULL,
`aggregate_status_updates` enum('0','1','2') default NULL,
`status_update_interval` int(11) default NULL,
`nagios_user` varchar(255) default NULL,
`nagios_group` varchar(255) default NULL,
`enable_notifications` enum('0','1','2') default NULL,
`execute_service_checks` enum('0','1','2') default NULL,
`accept_passive_service_checks` enum('0','1','2') default NULL,
`execute_host_checks` enum('0','1','2') default NULL,
`accept_passive_host_checks` enum('0','1','2') default NULL,
`enable_event_handlers` enum('0','1','2') default NULL,
`log_rotation_method` varchar(255) default NULL,
`log_archive_path` varchar(255) default NULL,
`check_external_commands` enum('0','1','2') default NULL,
`command_check_interval` varchar(255) default NULL,
`command_file` varchar(255) default NULL,
`downtime_file` varchar(255) default NULL,
`comment_file` varchar(255) default NULL,
`lock_file` varchar(255) default NULL,
`retain_state_information` enum('0','1','2') default NULL,
`state_retention_file` varchar(255) default NULL,
`retention_update_interval` int(11) default NULL,
`use_retained_program_state` enum('0','1','2') default NULL,
`use_retained_scheduling_info` enum('0','1','2') default NULL,
`use_syslog` enum('0','1','2') default NULL,
`log_notifications` enum('0','1','2') default NULL,
`log_service_retries` enum('0','1','2') default NULL,
`log_host_retries` enum('0','1','2') default NULL,
`log_event_handlers` enum('0','1','2') default NULL,
`log_initial_states` enum('0','1','2') default NULL,
`log_external_commands` enum('0','1','2') default NULL,
`log_passive_service_checks` enum('0','1','2') default NULL,
`log_passive_checks` enum('0','1','2') default NULL,
`global_host_event_handler` int(11) default NULL,
`global_service_event_handler` int(11) default NULL,
`sleep_time` int(11) default NULL,
`inter_check_delay_method` varchar(255) default NULL,
`service_inter_check_delay_method` varchar(255) default NULL,
`host_inter_check_delay_method` varchar(255) default NULL,
`service_interleave_factor` varchar(255) default NULL,
`max_concurrent_checks` int(11) default NULL,
`max_service_check_spread` int(11) default NULL,
`max_host_check_spread` int(11) default NULL,
`service_reaper_frequency` int(11) default NULL,
`interval_length` int(11) default NULL,
`auto_reschedule_checks` enum('0','1','2') default NULL,
`auto_rescheduling_interval` int(11) default NULL,
`auto_rescheduling_window` int(11) default NULL,
`use_agressive_host_checking` enum('0','1','2') default NULL,
`enable_flap_detection` enum('0','1','2') default NULL,
`low_service_flap_threshold` varchar(255) default NULL,
`high_service_flap_threshold` varchar(255) default NULL,
`low_host_flap_threshold` varchar(255) default NULL,
`high_host_flap_threshold` varchar(255) default NULL,
`soft_state_dependencies` enum('0','1','2') default NULL,
`service_check_timeout` int(11) default NULL,
`host_check_timeout` int(11) default NULL,
`event_handler_timeout` int(11) default NULL,
`notification_timeout` int(11) default NULL,
`ocsp_timeout` int(11) default NULL,
`ochp_timeout` int(11) default NULL,
`perfdata_timeout` int(11) default NULL,
`obsess_over_services` enum('0','1','2') default NULL,
`ocsp_command` int(11) default NULL,
`obsess_over_hosts` enum('0','1','2') default NULL,
`ochp_command` int(11) default NULL,
`process_performance_data` enum('0','1','2') default NULL,
`host_perfdata_command` int(11) default NULL,
`service_perfdata_command` int(11) default NULL,
`host_perfdata_file` varchar(255) default NULL,
`service_perfdata_file` varchar(255) default NULL,
`host_perfdata_file_template` text,
`service_perfdata_file_template` text,
`host_perfdata_file_mode` enum('a','w','2') default NULL,
`service_perfdata_file_mode` enum('a','w','2') default NULL,
`host_perfdata_file_processing_interval` int(11) default NULL,
`service_perfdata_file_processing_interval` int(11) default NULL,
`host_perfdata_file_processing_command` int(11) default NULL,
`service_perfdata_file_processing_command` int(11) default NULL,
`check_for_orphaned_services` enum('0','1','2') default NULL,
`check_service_freshness` enum('0','1','2') default NULL,
`service_freshness_check_interval` int(11) default NULL,
`freshness_check_interval` int(11) default NULL,
`check_host_freshness` enum('0','1','2') default NULL,
`host_freshness_check_interval` int(11) default NULL,
`date_format` varchar(255) default NULL,
`illegal_object_name_chars` varchar(255) default NULL,
`illegal_macro_output_chars` varchar(255) default NULL,
`use_regexp_matching` enum('0','1','2') default NULL,
`use_true_regexp_matching` enum('0','1','2') default NULL,
`admin_email` varchar(255) default NULL,
`admin_pager` varchar(255) default NULL,
`nagios_comment` text,
`nagios_activate` enum('0','1') default NULL,
PRIMARY KEY (`nagios_id`),
KEY `cmd1_index` (`global_host_event_handler`),
KEY `cmd2_index` (`global_service_event_handler`),
KEY `cmd3_index` (`ocsp_command`),
KEY `cmd4_index` (`ochp_command`),
KEY `cmd5_index` (`host_perfdata_command`),
KEY `cmd6_index` (`service_perfdata_command`),
KEY `cmd7_index` (`host_perfdata_file_processing_command`),
KEY `cmd8_index` (`service_perfdata_file_processing_command`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `cfg_nagios`
--
ALTER TABLE `cfg_nagios`
ADD CONSTRAINT `cfg_nagios_ibfk_1` FOREIGN KEY (`global_host_event_handler`) REFERENCES `command` (`command_id`) ON DELETE SET NULL,
ADD CONSTRAINT `cfg_nagios_ibfk_2` FOREIGN KEY (`global_service_event_handler`) REFERENCES `command` (`command_id`) ON DELETE SET NULL,
ADD CONSTRAINT `cfg_nagios_ibfk_3` FOREIGN KEY (`ocsp_command`) REFERENCES `command` (`command_id`) ON DELETE SET NULL,
ADD CONSTRAINT `cfg_nagios_ibfk_4` FOREIGN KEY (`ochp_command`) REFERENCES `command` (`command_id`) ON DELETE SET NULL,
ADD CONSTRAINT `cfg_nagios_ibfk_5` FOREIGN KEY (`host_perfdata_command`) REFERENCES `command` (`command_id`) ON DELETE SET NULL,
ADD CONSTRAINT `cfg_nagios_ibfk_6` FOREIGN KEY (`service_perfdata_command`) REFERENCES `command` (`command_id`) ON DELETE SET NULL,
ADD CONSTRAINT `cfg_nagios_ibfk_7` FOREIGN KEY (`service_perfdata_command`) REFERENCES `command` (`command_id`) ON DELETE SET NULL,
ADD CONSTRAINT `cfg_nagios_ibfk_8` FOREIGN KEY (`host_perfdata_file_processing_command`) REFERENCES `command` (`command_id`) ON DELETE SET NULL,
ADD CONSTRAINT `cfg_nagios_ibfk_9` FOREIGN KEY (`service_perfdata_file_processing_command`) REFERENCES `command` (`command_id`) ON DELETE SET NULL;

BZ
2nd July 2006, 20:49
I have the same problem!!
any news?

mdemsar
3rd July 2006, 09:29
Hello!

Do you have any data in your PerfParse database? If not, you should check your Perfparse config and if you think, that everything is OK but still not working, you should check your variables. In Nagios 2.X some variables have changed and PerfParse does not have this in documentation. If you need, I can send you required info. For example, this is my Nagios 2.x perfparse command:
/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

If you compare this to you process-perfparse-perfdata command you should see the changed macros.
By the way, graphs in Oreon still don't work and I gave up fixing it for now. I use perfparse.

abc
3rd July 2006, 10:03
I have the same problem... I can’t see the graph.... :(

When I tried to enable using the PerfParse I got the following errors:

Directory + Mailer Binary: /usr/bin/mail ((* Can't execute binary))

Images Directory: /usr/local/nagios/share/images/logo/ ((Can't write directory))

What do this mean??!!!...

The second directory exists & has the following permission:
# ls -ld /usr/local/nagios/share/images/logos/
drwxrwxr-x 2 nagios nagios 4096 Jun 19 08:38 /usr/local/nagios/share/images/logos/

But I can’t see the first one (/usr/bin/mail/) do I have to it as an empty directory or what??!!!

abc
3rd July 2006, 10:03
I have the same problem... I can’t see the graph.... :(

When I tried to enable using the PerfParse I got the following errors:

Directory + Mailer Binary: /usr/bin/mail ((* Can't execute binary))

Images Directory: /usr/local/nagios/share/images/logo/ ((Can't write directory))

What do this mean??!!!...

The second directory exists & has the following permission:
# ls -ld /usr/local/nagios/share/images/logos/
drwxrwxr-x 2 nagios nagios 4096 Jun 19 08:38 /usr/local/nagios/share/images/logos/

But I can’t see the first one (/usr/bin/mail/) do I have to it as an empty directory or what??!!!

mdemsar
3rd July 2006, 11:18
One possibility, but small one is that you don't have mail software installed. Maybe your web user user doesn't have rights to /usr/bin/ . Oreon uses a wwwrun user and you should su to wwwrun (or your respective user-I use SLES and here is wwwrun) and try executing mail. You can also su to web user and running "which mail". Then you type this path to Oreon config.

The second directory has permissions for user nagios, group nagios and maybe your oreon user (wwwrun etc.) is not a member of your nagios group.
Execute "cat /etc/group" and look for members of web server group. My file looks like this:
nagios:!:19047:wwwrun

abc
3rd July 2006, 13:03
Ok... Thanks… the first one is solved now, my mail on /bin/mail..

But it still shows the second message: :(
Images Directory: /usr/local/nagios/share/images/logo/ ((Can't write directory))

My http user:
# more /etc/httpd/conf/httpd.conf
User apache

& the Nagios user:
# cat /etc/goup
nagios:x:500:apache

So it should has permission or not???!!
How can l know my Oreon user??!!.... :roll:

mdemsar
3rd July 2006, 13:55
Your data is correct. Oreon's user is web server user (I think) so in your case "apache". Maybe one of the developers of application will come by this forum. If I get idea I will post here.
In the meantime you can maybe try granting all rights to "logos" folder to user nagios, group nagios:
"chmod 777 /usr/local/nagios/share/images/logos"
Try then and if it doesn't work, there could be a problem with your installation. If it does work, user rights were not granted properly during install.

BZ
3rd July 2006, 18:34
I have serius problens =(
i using oreon 1.3 rc1 and nagios 1.x

Everthing ok, but my database dont growup.

and when i click on the "minigraph" icon at monitoring screen, i get the graph generation screen, but host/service and metaservice fields are empty.

The "dropdown" box, dont have anyting.. ( i tink it is becouse the database are empty, just the fields and tables, no data)

when i try access the http://MYHOST/nagios/cgi-bin/perfparse.cgi the main screen of perfparse appear, but no hosts /servcies etc etc, empty too


any hints?

DonKiShoot
3rd July 2006, 19:12
perfparse is missconfigured, try to resolve this first ! :wink:

mdemsar
4th July 2006, 08:46
This documentation is very good:
http://perfparse.sourceforge.net/docs.php
It is for Nagios 1.X.

By the way: my Perfparse is working OK and logging all events, but in Oreon I get no graphs. Everything empty. I am also using Oreon plugins, but no effect. RRDs are in a directory (/usr/local/oreon/rrd), there are also some rrd's in /usr/local/oreon/filesGeneration/graphs/simpleRenderer/rrdDB, but nothing. Perfparse draws graphs, but Oreon only gives me this for every service I want to graph:

DonKiShoot
4th July 2006, 11:02
Ok now you are at the same point as me.

Perfparse results go in database but some difficulty to obtain a good graph with Oreon.

Maybe in RC2 :D

PS: On the first test i have had good graph but after a while, no more graph :(

mdemsar
4th July 2006, 12:04
My problem exactly. It worked in the begining, but then it stopped.

stinkybob
2nd August 2006, 18:40
I'm the same way. I have data in the database, but graphs are empty.