LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 03-03-2010, 12:32 PM   #1
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Rep: Reputation: 33
NagiosGraph RRD is not getting populated.


Nagios version: Nagios Core 3.2.0
Nagiosgraph Version: nagiosgraph-1.1.2
OS RHEL 5.3 64bit

nagios.cfg
Code:
log_file=/usr/local/nagios/var/nagios.log                                                    
cfg_file=/usr/local/nagios/etc/objects/commands.cfg                                          
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg                                          
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg                                       
cfg_file=/usr/local/nagios/etc/objects/templates.cfg                                         
cfg_file=/usr/local/nagios/etc/objects/hostgroups.cfg                                        
cfg_file=/usr/local/nagios/etc/objects/localhost.cfg                                         
cfg_dir=/usr/local/nagios/etc/servers                                                        
cfg_dir=/usr/local/nagios/etc/switches                                                       
object_cache_file=/usr/local/nagios/var/objects.cache                                        
precached_object_file=/usr/local/nagios/var/objects.precache                                 
resource_file=/usr/local/nagios/etc/resource.cfg                                             
status_file=/usr/local/nagios/var/status.dat                                                 
status_update_interval=10                                                                    
nagios_user=nagios                                                                           
nagios_group=nagios                                                                          
check_external_commands=1                                                                    
command_check_interval=300s                                                                  
command_file=/usr/local/nagios/var/rw/nagios.cmd                                             
external_command_buffer_slots=4096                                                           
lock_file=/usr/local/nagios/var/nagios.lock                                                  
temp_file=/usr/local/nagios/var/nagios.tmp                                                   
temp_path=/tmp                                                                               
event_broker_options=-1                                                                      
broker_module=/usr/local/nagios/bin/ndomod-3x.o   config_file=/usr/local/nagios/etc/ndomod.cfg
log_rotation_method=d                                                                        
log_archive_path=/usr/local/nagios/var/archives                                              
use_syslog=1                                                                                 
log_notifications=1                                                                          
log_service_retries=1                                                                        
log_host_retries=1                                                                           
log_event_handlers=1                                                                         
log_initial_states=0                                                                         
log_external_commands=1                                                                      
log_passive_checks=1                                                                         
service_inter_check_delay_method=s                                                           
max_service_check_spread=30                                                                  
service_interleave_factor=s                                                                  
host_inter_check_delay_method=s                                                              
max_host_check_spread=30                                                                     
max_concurrent_checks=0                                                                      
check_result_reaper_frequency=10                                                             
max_check_result_reaper_time=30                                                              
check_result_path=/usr/local/nagios/var/spool/checkresults                                   
max_check_result_file_age=3600                                                               
cached_host_check_horizon=15                                                                 
cached_service_check_horizon=15                                                              
enable_predictive_host_dependency_checks=1                                                   
enable_predictive_service_dependency_checks=1                                                
soft_state_dependencies=0                                                                    
auto_reschedule_checks=0                                                                     
auto_rescheduling_interval=30                                                                
auto_rescheduling_window=180                                                                 
sleep_time=0.25                                                                              
service_check_timeout=60                                                                     
host_check_timeout=30                                                                        
event_handler_timeout=30                                                                     
notification_timeout=30                                                                      
ocsp_timeout=5                                                                               
perfdata_timeout=5                                                                           
retain_state_information=1                                                                   
state_retention_file=/usr/local/nagios/var/retention.dat                                     
retention_update_interval=60                                                                 
use_retained_program_state=1                                                                 
use_retained_scheduling_info=1                                                               
retained_host_attribute_mask=0                                                               
retained_service_attribute_mask=0                                                            
retained_process_host_attribute_mask=0                                                       
retained_process_service_attribute_mask=0                                                    
retained_contact_host_attribute_mask=0                                                       
retained_contact_service_attribute_mask=0                                                    
interval_length=60                                                                           
check_for_updates=1                                                                          
bare_update_check=0                                                                          
use_aggressive_host_checking=0                                                               
execute_service_checks=1                                                                     
accept_passive_service_checks=1                                                              
execute_host_checks=1                                                                        
accept_passive_host_checks=1                                                                 
enable_notifications=1                                                                       
enable_event_handlers=1                                                                      
process_performance_data=0                                                                   
obsess_over_services=0                                                                       
obsess_over_hosts=0
translate_passive_host_checks=0
passive_host_checks_are_soft=0
check_for_orphaned_services=1
check_for_orphaned_hosts=1
check_service_freshness=1
service_freshness_check_interval=60
check_host_freshness=0
host_freshness_check_interval=60
additional_freshness_latency=15
enable_flap_detection=1
low_service_flap_threshold=5.0
high_service_flap_threshold=20.0
low_host_flap_threshold=5.0
high_host_flap_threshold=20.0
date_format=us
p1_file=/usr/local/nagios/bin/p1.pl
enable_embedded_perl=1
use_embedded_perl_implicitly=1
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
illegal_macro_output_chars=`~$&|'"<>
use_regexp_matching=0
use_true_regexp_matching=0
admin_email=nagios@localhost
admin_pager=pagenagios@localhost
daemon_dumps_core=0
use_large_installation_tweaks=0
enable_environment_macros=1
debug_level=0
debug_verbosity=1
debug_ file=/usr/local/nagios/var/nagios.debug
max_debug_file_size=1000000
 process_performance_data=1
     service_perfdata_file=/var/spool/nagios/perfdata.log
     service_perfdata_file_template=$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$
     service_perfdata_file_mode=a
     service_perfdata_file_processing_interval=30
     service_perfdata_file_processing_command=process-service-perfdata
nagiosgraph.cfg
Code:
debug = 5                                                                                
logfile = /var/log/nagiosgraph.log                                                       
rrddir =  /usr/local/nagios/nagiosgraph/rrd                                              
mapfile = /usr/local/nagios/nagiosgraph/map                                              
colorscheme = 1                                                                          
heartbeat = 600                                                                          
stylesheet = /nagios/stylesheets/nagiosgraph.css                                         
dbseparator = subdir                                                                     
plotas = LINE2                                                                           
maximums = Current Load,PLW,Procs: total,Procs: zombie,User Count                        
minimums = APCUPSD,Mem: free,Mem: swap                                                   
hostdb = /usr/local/nagios/etc/hostdb.conf                                               
servdb = /usr/local/nagios/etc/servdb.conf                                               
nagioscgiurl = https://nagiosserver/nagios/cgi-bin                                       
selecthost = Select server                                                               
selectserv = Select service                                                              
fixedscale = Fixed Scale                                                                 
submit = Update Graphs
perfforhost = Performance data for host
perfforserv = Performance data for service
service = service
asof = as of
dai = Today
daily = Daily
day = Today
week = This Week
weekly = Weekly
month = This Month
monthly = Monthly
year = This Year
yearly = Yearly
configerror = Configuration Error (email <a href="mailto:alan.brenner@ithaka.org">Alan</a>).
noservicegiven = Bad URL for showservice.cgi; no service given
apcupsd = Uninterruptible Power Supply Status (Battery Charge, Tempurature, Load Percentage, Time Left)
bps = Bits Per Second
clamdb = Clam Database
diskgb = Disk Usage
http = Bits Per Second
load = Load Average
losspct = Loss Percentage
mailq = Pending Output E-mail Messages
memory = RAM Usage
Mem%3A%20swap = Swap Utilization
ping = Ping Loss Percentage and Round Trip Average
PLW = Perl Log Watcher Events
procs = Processes
qsize = Messages in Outbound Queue
rta = Round Trip Average
smtp = E-mail Status
testcolor = Show Colors
typesome = Type some space seperated nagiosgraph line names here
graph = Graph
previous = previous
next = next
createdby = Created by
command.cfg

Code:
                                                                                 
define command{                                                                              
        command_name    notify-host-by-email                                                 
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$                                                             
        }                                                                                    
define command{                                                                              
        command_name    notify-service-by-email                                              
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$                                                                                       
        }                                                                                    
define command{                                                                              
        command_name    check-host-alive                                                     
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
        }                                                                                    
define command{                                                                              
        command_name    check_local_disk                                                     
        command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$                     
        }                                                                                    
define command{                                                                              
        command_name    check_local_load                                                     
        command_line    $USER1$/check_load -w $ARG1$ -c $ARG2$                               
        }                                                                                    
define command{                                                                              
        command_name    check_local_procs                                                    
        command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$                    
        }                                                                                    
define command{                                                                              
        command_name    check_local_users                                                    
        command_line    $USER1$/check_users -w $ARG1$ -c $ARG2$                              
        }                                                                                    
define command{                                                                              
        command_name    check_local_swap                                                     
        command_line    $USER1$/check_swap -w $ARG1$ -c $ARG2$                               
        }                                                                                    
define command{                                                                              
        command_name    check_local_mrtgtraf                                                 
        command_line    $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$                                                                                           
        }                                                                                    
define command{                                                                              
        command_name    check_ftp                                                            
        command_line    $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$                            
        }                                                                                    
define command{                                                                              
        command_name    check_hpjd                                                           
        command_line    $USER1$/check_hpjd -H $HOSTADDRESS$ $ARG1$                           
        }                                                                                    
define command{                                                                              
        command_name    check_snmp                                                           
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$                           
        }                                                                                    
define command{                                                                              
        command_name    check_http                                                           
        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$                           
        }                                                                                    
define command{                                                                              
        command_name    check_ssh                                                            
        command_line    $USER1$/check_ssh $ARG1$ $HOSTADDRESS$                               
        }                                                                                    
define command{                                                                              
        command_name    check_dhcp                                                           
        command_line    $USER1$/check_dhcp $ARG1$                                            
        }                                                                                    
define command{                                                                              
        command_name    check_ping                                                           
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5         
        }                                                                                    
define command{                                                                              
        command_name    check_pop                                                            
        command_line    $USER1$/check_pop -H $HOSTADDRESS$ $ARG1$                            
        }                                                                                    
define command{                                                                              
        command_name    check_imap                                                           
        command_line    $USER1$/check_imap -H $HOSTADDRESS$ $ARG1$                           
        }                                                                                    
define command{                                                                              
        command_name    check_smtp                                                           
        command_line    $USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$                           
}
define command {
 command_name process-service-perfdata
 command_line   /usr/local/nagios/lib/nagios/insert.pl  "$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$"

localhost.cfg

Code:
define host{                                                                                 
        use                     linux-server            ; Name of host template to use       
                                                        ; This host definition will inherit all variables that are defined                                                                 
        host_name               localhost                                                    
        alias                   localhost                                                    
        address                 127.0.0.1                                                    
        }                                                                                    
define hostgroup{                                                                            
        hostgroup_name  linux-servers ; The name of the hostgroup                            
        alias           Linux Servers ; Long name of the group                               
        members         localhost     ; Comma separated list of hosts that belong to this group                                                                                            
        }                                                                                    
define service{                                                                              
        use                             local-service         ; Name of service template to use                                                                                            
        host_name                       localhost                                            
        service_description             PING                                                 
        check_command                   check_ping!100.0,20%!500.0,60%                       
        }                                                                                    
define service{                                                                              
        use                             local-service         ; Name of service template to use                                                                                            
        host_name                       localhost                                            
        service_description             Root Partition                                       
        check_command                   check_local_disk!20%!10%!/                           
        }                                                                                    
define service{                                                                              
        use                             local-service         ; Name of service template to use                                                                                            
        host_name                       localhost                                            
        service_description             Total Processes                                      
        check_command                   check_local_procs!250!400!RSZDT                      
        }                                                                                    
define serviceextinfo {                                                                      
 service_description Current Load                                                            
 host_name           localhost                                                               
 notes_url       /nagiosgraph/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$
       icon_image      graph.gif
       icon_image_alt  View graphs
}
define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             Current Load
        check_command                   check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
        }
define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             Swap Usage
        check_command                   check_local_swap!20!10
        }
define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             Echo
        check_command                   Echo
        notifications_enabled           0

        }
define service{
        use                             local-service         ; Name of service template to use
        host_name                       localhost
        service_description             Current Users
        check_command                   check_local_users!20!50
        }
define serviceextinfo {
 service_description Current Users
 host_name           localhost
 notes_url       /nagiosgraph/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$



Thanks.
 
Old 03-16-2010, 03:49 AM   #2
timvandijk039
Member
 
Registered: Jul 2009
Location: The Netherlands
Distribution: Debian/Ubuntu and RHEL/CentOS
Posts: 42

Rep: Reputation: 18
Hi knockout_artist,

I don't have any experience with using Nagios Graph, but had a similar problem with PNP (has the same functionality as Nagios graph).

Check out the file and directory permissions on the files and dirs where graph-data is written to. Also keep in mind the the permissions have to be set according to the user Nagios is running under (the default user is "nagios").

Hope this helps.

Best regards,
Tim
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora Core 9 + Nagios 3.0.6 + Nagiosgraph 1.2.1 - how to get the perl modules JonXP Linux - Newbie 3 03-05-2009 09:39 PM
location.hrefs not being populated in IE url blaze7 Linux - Newbie 1 08-18-2006 06:10 PM
udev: /dev/ directory over-populated - why? Yalla-One Slackware 3 08-13-2006 01:47 PM
redhat-config-users is not populated viswanaath Linux - Newbie 1 11-11-2005 02:05 PM
rrd mrtg & mrtg-rrd.cgi ducati620 Linux - Newbie 0 06-03-2004 07:29 PM


All times are GMT -5. The time now is 08:18 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration