pls, have a look at my configs

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.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: pls, have a look at my configs

Post by vvz »

here it is my nagios.cfg

Code: Select all

log_file=/var/log/nagios/nagios.log
cfg_file=/etc/nagios/objects/commands.cfg
cfg_file=/etc/nagios/objects/templates/templates.cfg
cfg_file=/etc/nagios/objects/contacts.cfg
cfg_file=/etc/nagios/objects/services/warning/rootPartition-localhost-warning.cfg
cfg_file=/etc/nagios/objects/services/warning/rootPartition-status-passive-warning.cfg
cfg_file=/etc/nagios/objects/services/warning/rootPartition-nrpe-warning.cfg
cfg_file=/etc/nagios/objects/services/warning/dataPartition-nrpe-warning.cfg
cfg_dir=/etc/nagios/conf.d
object_cache_file=/var/log/nagios/objects.cache
precached_object_file=/var/log/nagios/objects.precache
resource_file=/etc/nagios/private/resource.cfg
status_file=/var/log/nagios/status.dat
status_update_interval=10
nagios_user=nagios
nagios_group=nagios
check_external_commands=1
command_check_interval=-1
command_file=/var/spool/nagios/cmd/nagios.cmd
external_command_buffer_slots=4096
lock_file=/var/run/nagios.pid
temp_file=/var/log/nagios/nagios.tmp
temp_path=/tmp
event_broker_options=-1
log_rotation_method=d
log_archive_path=/var/log/nagios/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=/var/log/nagios/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=/var/log/nagios/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=0
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
service_check_timeout_state=c
check_host_freshness=0
host_freshness_check_interval=60
additional_freshness_latency=15
enable_flap_detection=0
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/sbin/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=-1
debug_verbosity=2
debug_file=/var/log/nagios/nagios.debug
max_debug_file_size=1000000
here it my commands.cfg

Code: Select all

define command {
        command_name    notify-service-by-pagerduty
        command_line    /usr/local/bin/pagerduty_nagios.pl enqueue -f pd_nagios_object=service -f NOTIFICATIONTYPE="$NOTIFICATIONTYPE$" -f HOSTNAME="$HOSTNAME$" -f SERVICEDESC="$SERVICEDESC$" -f SERVICESTATE="$SERVICESTATE$" -f CONTACTPAGER="$CONTACTPAGER$" --verbose  --proxy http://callme-dor-smg1:9867
        }

define command {
        command_name    notify-host-by-pagerduty
        command_line    /usr/local/bin/pagerduty_nagios.pl enqueue -f pd_nagios_object=host  -f NOTIFICATIONTYPE="$NOTIFICATIONTYPE$" -f HOSTNAME="$HOSTNAME$" -f HOSTSTATE="$HOSTSTATE$" -f CONTACTPAGER="$CONTACTPAGER$" --verbose --proxy http://callme-dor-smg1:9867
        }

# 'notify-host-by-email' command definition
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$
        }

# 'notify-service-by-email' command definition
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$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
        }





################################################################################
#
# SAMPLE HOST CHECK COMMANDS
#
################################################################################


# This command checks to see if a host is "alive" by pinging it
# The check must result in a 100% packet loss or 5 second (5000ms) round trip 
# average time to produce a critical error.
# Note: Five ICMP echo packets are sent (determined by the '-p 5' argument)

# 'check-host-alive' command definition
define command{
        command_name    check-host-alive
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 300.0,80% -c 500.0,100% -p 5
        }


define command{
        command_name    check_logwarn
        command_line    sudo $USER1$/check_logwarn -d /usr/lib64/nagios/plugins /usr/lib64/nagios/plugins/mylog.txt  'HOST ALERT'
        }

define command{
        command_name    run-nsca-script
        command_line    /usr/lib64/nagios/plugins/dummy.sh
        }

################## end of passive check command ################################### 

########  check_proliant.py commands for local host  #################################

define command{
        command_name    check_fans
        command_line    /usr/lib64/nagios/plugins/check_proliant.py --type=fan
        }

define command{
        command_name    check_temperature
        command_line    /usr/lib64/nagios/plugins/check_proliant.py --type=temp
        }

define command{
        command_name    check_processors
        command_line    /usr/lib64/nagios/plugins/check_proliant.py --type=proc
        }

define command{
        command_name    check_dimm
        command_line    /usr/lib64/nagios/plugins/check_proliant.py --type=dimm
        }


define command{
        command_name    check_power
        command_line    /usr/lib64/nagios/plugins/check_proliant.py --type=ps
        }
################### end of check_proliant commands for local computer ###########################


define command{
        command_name    check_smg
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_smg"
        }

define command{
        command_name    check_nrpe_users
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_users"
        }
define command{
        command_name    check_nrpe_fans
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_fan" -t 300
        }
define command{
        command_name    check_nrpe_temperature
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_temperature" -t 300
        }
define command{
        command_name    check_nrpe_processors
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_processors" -t 300
        }
define command{
        command_name    check_nrpe_dimm
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_dimm" -t 300
        }
define command{
        command_name    check_nrpe_power
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_power" -t 300
        }

define command{
        command_name    check_nrpe_load
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_load" -t 300
        }

define command{
       command_name    check_nrpe_disk_usage
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_sda1" -t 300
       }

define command{
       command_name    check_data_disk_usage
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_sda2" -t 300
       }

define command{
        command_name    check_ps.sh
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_ps" -t 300
        }

define command{
        command_name    check_bond620
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_bond620" -t 300
        }

define command{
        command_name    check_bond621
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c "check_bond621" -t 300
        }
define command{
        command_name    check_local_disk
        command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
        }


# 'check_local_load' command definition
define command{
        command_name    check_local_load
        command_line    $USER1$/check_load -w $ARG1$ -c $ARG2$
        }
# 'process-host-perfdata' command definition
define command{
        command_name    process-host-perfdata
        command_line    /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /var/log/nagios/host-perfdata.out
        }


# 'process-service-perfdata' command definition
define command{
        command_name    process-service-perfdata
        command_line    /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /var/log/nagios/service-perfdata.out
        }

vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: pls, have a look at my configs

Post by vvz »

permissions are OK because all other scripts working just fine with pagerduty
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: pls, have a look at my configs

Post by tmcdonald »

Please post or PM to me your objects.cache file, which will be located in your nagios/objects.cache directory. It might contain information you would consider sensitive, so if you are not comfortable posting it publicly, please PM me and I will make it available to the support team.

I'd also like the name of a few passive checks that are working appropriately, so we can compare.
Former Nagios employee
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: pls, have a look at my configs

Post by vvz »

I'm restarting nagios server a few times per day, because I have number of services to be added - so the answer is - yes, I've restarted server

I sent my nagios.cfg but I don't see it here... should I send it one more time?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: pls, have a look at my configs

Post by tmcdonald »

Did you send it to me in a PM or did you upload it in a post? I have not received a PM from you, and if you have uploaded it in a post make sure that after you select the file, you press "Attach" as well.
Former Nagios employee
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: pls, have a look at my configs

Post by vvz »

OK, just a sec
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: pls, have a look at my configs

Post by vvz »

Hopefully it works this time
attached my nagios.cfg
Attachments
myconf.cfg
(8.75 KiB) Downloaded 264 times
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: pls, have a look at my configs

Post by ssax »

He was asking for your /usr/local/nagios/var/objects.cache file. Please upload that or PM it to one of us (it will have all your config information in it).
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: pls, have a look at my configs

Post by vvz »

sorry, here it is - attached
Attachments
objects.txt
(150.32 KiB) Downloaded 258 times
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: pls, have a look at my configs

Post by tgriep »

In the objects.cache file, I could not find the hostgroup called "root-partition-status-passive" and the new service check that you setup for warnings.
Can you restart the nagios process to see if the objects.cache file gets updated and post the new objects.cache file after running the following?

Code: Select all

service nagios restart
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked