nagios.cmd ... "Sorry, you are not authorized..." -- Argh!

Scott Urbatsch scott at urbatsch.com
Fri Jan 10 16:24:22 CET 2003


You need to add apache to the nagioscmd group.  Apache is the user that 
requires the access desired below.

At 02:08 AM 1/10/2003 -0500, Olivier Beauchemin (Accolade Group) wrote:
>Despite my best efforts, I can't figure it out. Here's all the details, 
>any help is greatly appreciated...
>
>I know this is a lot to sift through... but I'm desparate to get this working.
>
>Thanks,
>Olivier
>
>####
>
>Environment
>-------------
>Redhat 8.0
>Apache (that came with RedHat 8.0)
>Perl 5.8.0
>Only the defaults with ./configure
>
>
>Snippet from hosts.cfg
>-----------------------
># 'foo host' definition template
>define host{
>         name                            foo-host    ; The name of this 
> host template
>         notifications_enabled           1       ; Host notifications are 
> enabled
>         event_handler_enabled           1       ; Host event handler is 
> enabled
>         flap_detection_enabled          1       ; Flap detection is enabled
>         process_perf_data               1       ; Process performance data
>         retain_status_information       1       ; Retain status 
> information across program restarts
>         retain_nonstatus_information    1       ; Retain non-status 
> information across program restarts
>         register                        0       ; DONT REGISTER THIS 
> DEFINITION!
>         }
>
># 'foo.foo.com host definition
>define host{
>         use                     foo-host            ; Name of host 
> template to use
>         host_name               foo.foo.com
>         alias                   foo.foo.com
>         address                 63.170.56.34
>         check_command           check-host-alive
>         max_check_attempts      10
>         notification_interval   120
>         notification_period     24x7
>         notification_options    d,u,r
>         }
>
>
>Snippet from services.cfg
>-------------------------
># 'foo-service' template for accolade group hosts/services
>define service{
>         name                            foo-service ; The 'name' of this 
> service template
>         active_checks_enabled           1       ; Active service checks 
> are enabled
>         passive_checks_enabled          1       ; Passive service checks 
> are enabled/accepted
>         parallelize_check               1       ; Active service checks 
> should be parallelized (bad idea)
>         obsess_over_service             1       ; We should obsess over 
> this service (if necessary)
>         check_freshness                 0       ; Default is to NOT check 
> service 'freshness'
>         notifications_enabled           1       ; Service notifications 
> are enabled
>         event_handler_enabled           1       ; Service event handler 
> is enabled
>         flap_detection_enabled          1       ; Flap detection is enabled
>         process_perf_data               1       ; Process performance data
>         retain_status_information       1       ; Retain status 
> information across program restarts
>         retain_nonstatus_information    1       ; Retain non-status 
> information across program restarts
>         is_volatile                     0
>         check_period                    24x7
>         max_check_attempts              3
>         normal_check_interval           5
>         retry_check_interval            1
>         notification_interval           120
>         register                        0       ; DONT REGISTER THIS 
> DEFINITION!
>         }
>
>define service{
>         use                             foo-service                ; Name 
> of service template to use
>         host_name                       foo.foo.com
>         service_description             FTP
>         contact_groups                  olivier
>         notification_period             24x7
>         notification_options            w,u,c,r
>         check_command                   check_ftp!-H 63.170.56.35
>         }
>
>
>Snippet from contacts.cfg
>-------------------------
># 'olivier' contact definition
>define contact{
>         contact_name                    olivier
>         alias                           olivier
>         service_notification_period     24x7
>         host_notification_period        24x7
>         service_notification_options    c,r
>         host_notification_options       d,r
>         service_notification_commands   notify-by-email
>         host_notification_commands      host-notify-by-email
>         email                           <mailto:foo at foo.com>foo at foo.com
>         }
>
>
>Snippet from contactgroups.cfg
>------------------------------
># 'olivier' contact group definition
>define contactgroup{
>         contactgroup_name       olivier
>         alias                   Olivier
>         members                 olivier
>         }
>
>
>Privs on the external command file and rw/ directory
>----------------------------------------------------
>prw-rw----    1 nagios   nagiocmd        0 Jan 10 01:39 nagios.cmd
>drwxrwsr-x    2 nagios   nagiocmd     4096 Jan 10 01:39 rw
>{the file nagios.cmd is in the rw/ directory}
>
>
>Snippets from cgi.cfg
>---------------------
>use_authentication=1
>authorized_for_system_information=nagiosadmin,olivier
>authorized_for_configuration_information=nagiosadmin,olivier
>authorized_for_system_commands=nagiosadmin,olivier
>authorized_for_all_services=nagiosadmin,olivier
>authorized_for_all_hosts=nagiosadmin,olivier
>authorized_for_all_service_commands=nagiosadmin,olivier
>authorized_for_all_host_commands=nagiosadmin,olivier
>
>
>Snippets from nagios.cfg
>------------------------
>log_file=/usr/local/nagios/var/nagios.log
>cfg_file=/usr/local/nagios/etc/checkcommands.cfg
>cfg_file=/usr/local/nagios/etc/misccommands.cfg
>cfg_file=/usr/local/nagios/etc/contactgroups.cfg
>cfg_file=/usr/local/nagios/etc/contacts.cfg
>cfg_file=/usr/local/nagios/etc/dependencies.cfg
>cfg_file=/usr/local/nagios/etc/escalations.cfg
>cfg_file=/usr/local/nagios/etc/hostgroups.cfg
>cfg_file=/usr/local/nagios/etc/hosts.cfg
>cfg_file=/usr/local/nagios/etc/services.cfg
>cfg_file=/usr/local/nagios/etc/timeperiods.cfg
>resource_file=/usr/local/nagios/etc/resource.cfg
>status_file=/usr/local/nagios/var/status.log
>nagios_user=nagios
>nagios_group=nagios
>check_external_commands=1
>command_check_interval=-1
>command_file=/usr/local/nagios/var/rw/nagios.cmd
>comment_file=/usr/local/nagios/var/comment.log
>downtime_file=/usr/local/nagios/var/downtime.log
>lock_file=/usr/local/nagios/var/nagios.lock
>temp_file=/usr/local/nagios/var/nagios.tmp
>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_service_checks=1
>inter_check_delay_method=s
>service_interleave_factor=s
>max_concurrent_checks=0
>service_reaper_frequency=10
>sleep_time=1
>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/status.sav
>retention_update_interval=60
>use_retained_program_state=0
>interval_length=60
>use_agressive_host_checking=0
>execute_service_checks=1
>accept_passive_service_checks=1
>enable_notifications=1
>enable_event_handlers=1
>process_performance_data=1
>obsess_over_services=0
>check_for_orphaned_services=0
>check_service_freshness=1
>freshness_check_interval=60
>aggregate_status_updates=1
>status_update_interval=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
>illegal_object_name_chars=`~!$%^&*|'"<>?,()=
>illegal_macro_output_chars=`~$&|'"<>
><mailto:admin_email=foo at foo.com>admin_email=foo at foo.com
><mailto:admin_pager=foopager at foo.com>admin_pager=foopager at foo.com
>
>####



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com




More information about the Users mailing list