Nagios-users Digest, Vol 26, Issue 32

Tec. Felix D. Sanchez fsanchez at serfitech.com
Thu Jul 24 19:31:09 CEST 2008


Yes, that's the strange part it keep refreshing with the old pid

If the Nagios is "up" and you run:
[nagios at satan ~/config/objects]$ /usr/local/nagios/libexec/check_nagios -F
/usr/local/nagios/var/status.dat -e 1 -C '/usr/local/nagios/bin/nagios'
//result
NAGIOS OK: 1 process, status log updated 11 seconds ago

If the Nagios is "down" and you run:
[nagios at satan ~/config/objects]$ /usr/local/nagios/libexec/check_nagios -F
/usr/local/nagios/var/status.dat -e 1 -C '/usr/local/nagios/bin/nagios'
//result
NAGIOS CRITICAL: Cannot open status log for reading!


[Part of my httpd.conf]
<VirtualHost N/A:80>
DocumentRoot "/usr/local/nagios/share"
ServerName N/A
<Directory "/usr/local/nagios/share">
allow from all
</Directory>
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
<Directory "/usr/local/nagios/sbin">
    Options ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/nagios/etc/htpasswd.users
    Require valid-user
</Directory>
Alias /nagios /usr/local/nagios/share
<Directory "/usr/local/nagios/share">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/nagios/etc/htpasswd.users
    Require valid-user
</Directory>
</VirtualHost>

[This is my nagios.cfg]
log_file=/usr/local/nagios/var/nagios.log
#nagios external config files
resource_file=/usr/local/nagios/etc/resource.cfg
cfg_file=/usr/local/nagios/etc/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/templates.cfg
cfg_file=/usr/local/nagios/etc/commands.cfg
cfg_file=/usr/local/nagios/etc/contactgroup.cfg
cfg_file=/usr/local/nagios/etc/hostgroups.cfg
#devices settings
#hq-servers
cfg_file=/usr/local/nagios/etc/objects/hagen.cfg
cfg_file=/usr/local/nagios/etc/objects/pucca.cfg

temp_file=/usr/local/nagios/var/nagios.tmp
status_file=/usr/local/nagios/var/status.dat
aggregate_status_updates=1
status_update_interval=15
nagios_user=nagios
nagios_group=nagios
enable_notifications=1
execute_service_checks=1
accept_passive_service_checks=1
enable_event_handlers=1
log_rotation_method=d
log_archive_path=/usr/local/nagios/var/archives
check_external_commands=1
command_check_interval=-1
comment_file=/usr/local/nagios/var/comments.dat
downtime_file=/usr/local/nagios/var/downtime.dat
command_file=/usr/local/nagios/var/rw/nagios.cmd
lock_file=/usr/local/nagios/var/nagios.lock
retain_state_information=1
state_retention_file=/usr/local/nagios/var/retention.dat
retention_update_interval=60
use_retained_program_state=1
use_syslog=1
log_notifications=1
log_service_retries=1
log_host_retries=1
log_event_handlers=1
log_initial_states=1
log_external_commands=1
sleep_time=0.25
max_concurrent_checks=0
service_reaper_frequency=10
interval_length=60
use_agressive_host_checking=0
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
soft_state_dependencies=0
service_check_timeout=60
host_check_timeout=30
event_handler_timeout=30
notification_timeout=30
ocsp_timeout=5
perfdata_timeout=5
obsess_over_services=0
process_performance_data=0
check_for_orphaned_services=1
check_service_freshness=1
freshness_check_interval=1
illegal_object_name_chars=`~!$%^&*|'"<>?,()=
illegal_macro_output_chars=`~$&|'"<>
admin_email=sysadmin at serfitech.com
admin_pager=pagenagios
date_format=euro


[This is my cgi.cfg]
main_config_file=/usr/local/nagios/etc/nagios.cfg
physical_html_path=/usr/local/nagios/share
url_html_path=/
show_context_help=1
nagios_check_command=/usr/local/nagios/libexec/check_nagios -F
/usr/local/nagios/var/status.dat -e 1 -C '/usr/local/nagios/bin/nagios'
use_pending_states=1
use_authentication=1
authorized_for_system_information=nagios
authorized_for_configuration_information=nagios
authorized_for_system_commands=nagios
authorized_for_all_services=nagios
authorized_for_all_hosts=nagios
authorized_for_all_service_commands=nagios
authorized_for_all_host_commands=nagios
default_statusmap_layout=5
default_statuswrl_layout=4
ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
refresh_rate=60
escape_html_tags=1
action_url_target=_blank
notes_url_target=_blank
lock_author_names=1



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

Message: 1
Date: Wed, 23 Jul 2008 23:19:38 +0200
From: Hugo van der Kooij <hvdkooij at vanderkooij.org>
Subject: Re: [Nagios-users] Problems with nagios cgi's and
	check_nagios
To: Nagios Users Mailinglist <nagios-users at lists.sourceforge.net>
Message-ID: <4887A06A.1030502 at vanderkooij.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tec. Felix D. Sanchez wrote:
| Hi
|
|   i've very strange problem, i've freebsd 6.3 and nagios 3.0.3 
| compiled from source, my problem is if nagios dameon is not runing, 
| the web interfaces does not recognize if the process is down or up, if 
| run /usr/local/nagios/libexec/check_nagios -F 
| /usr/local/nagios/var/status.dat -e 1 -C '/usr/local/nagios/bin/nagios'
| from console i get this "NAGIOS CRITICAL: Could not locate a running 
| Nagios process!" but from web, everything looks like the process is 
| still runing

Is the webpage still refreshing itself?
Did you enable the proper setting to monitor the status from the webpages?
In Nagios 2 the default setting is off as far as I can remember.

Hugo.


- --
hvdkooij at vanderkooij.org               http://hugo.vanderkooij.org/
PGP/GPG? Use: http://hugo.vanderkooij.org/0x58F19981.asc

	A: Yes.
	>Q: Are you sure?
	>>A: Because it reverses the logical flow of conversation.
	>>>Q: Why is top posting frowned upon?

Bored? Click on http://spamornot.org/ and rate those images.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFIh6BnBvzDRVjxmYERAqNJAJ42oeb+anvndsUswx3hahhf+4aGhwCdGOKd
BwcVNJJmRYNdB7DPVb4rZ3M=
=c+lg
-----END PGP SIGNATURE-----





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list