databases
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: databases
Is it all working now? There wasn't a /usr/local/nagiosxi/var/cmdsubsys.log attached. If you change'd the cron tab back, then the log file is overwritten unless you saved it off somewhere. The apply configs should show up in the log. One thing you could do is just tail -f /usr/local/nagiosxi/var/cmdsubsys.log and then run an apply config. It won't be in the log file permanently, but you could send the output of the tail command.
-
hsauerbach
- Posts: 39
- Joined: Thu Apr 20, 2017 9:19 am
Re: databases
What do I do to get plugins working again?
-
hsauerbach
- Posts: 39
- Joined: Thu Apr 20, 2017 9:19 am
Re: databases
I am sending the output from tailing /usr/local/nagiosxi/var/cmdsubsys.log and running Apply Configuration with security off:
te(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/nagiosxi/html/includes/utils-auditlog.inc.php on line 95
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2017-05-15 10:33:23-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’
0K .......... .......... .......... ...... 3.18M=0.01s
2017-05-15 10:33:24 (3.18 MB/s) - ‘nagiosql.login’ saved [37518]
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&backend=1&username=nagiosxi&password=YoGrOGiRDJEP' -O nagiosql.loginLOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
RESETTING PERMS
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2017-05-15 10:33:24-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’
0K .......... .......... .......... ...... 3.14M=0.01s
2017-05-15 10:33:24 (3.14 MB/s) - ‘nagiosql.login’ saved [37518]
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&backend=1&username=nagiosxi&password=YoGrOGiRDJEP' -O nagiosql.loginLOGIN SUCCESSFUL!
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2017-05-15 10:33:24-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.export.monitoring’
0K .......... .......... . 2.23M=0.009s
2017-05-15 10:33:25 (2.23 MB/s) - ‘nagiosql.export.monitoring’ saved [22085]
WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.2.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 12-07-2016
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for service 'Users' on host '<hostname-17>' (config file '/usr/local/nagios/etc/services/ssc-prd-dmav2-017.ba.ssa.gov.cfg', starting on line 272)
Warning: Duplicate definition found for service '/home Disk Usage' on host '<hostname-016>' (config file '/usr/local/nagios/etc/services/ssc-prd-dmav2-017.ba.ssa.gov.cfg', starting on line 32)
Warning: Duplicate definition found for service '/ Disk Usage' on host '<hostname-017>' (config file '/usr/local/nagios/etc/services/ssc-prd-dmav2-017.ba.ssa.gov.cfg', starting on line 16)
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 46 services.
Checked 3 hosts.
Checked 2 host groups.
Checked 0 service groups.
Checked 5 contacts.
Checked 3 contact groups.
Checked 125 commands.
Checked 11 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 3 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 11 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
RET: 0
OUTPUT=RET: 0
RETURNCODE=0
.PROCESSING COMMAND ID 621...
Thanks.
te(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/nagiosxi/html/includes/utils-auditlog.inc.php on line 95
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2017-05-15 10:33:23-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’
0K .......... .......... .......... ...... 3.18M=0.01s
2017-05-15 10:33:24 (3.18 MB/s) - ‘nagiosql.login’ saved [37518]
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&backend=1&username=nagiosxi&password=YoGrOGiRDJEP' -O nagiosql.loginLOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
RESETTING PERMS
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2017-05-15 10:33:24-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’
0K .......... .......... .......... ...... 3.14M=0.01s
2017-05-15 10:33:24 (3.14 MB/s) - ‘nagiosql.login’ saved [37518]
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&backend=1&username=nagiosxi&password=YoGrOGiRDJEP' -O nagiosql.loginLOGIN SUCCESSFUL!
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'backend=1&cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2017-05-15 10:33:24-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.export.monitoring’
0K .......... .......... . 2.23M=0.009s
2017-05-15 10:33:25 (2.23 MB/s) - ‘nagiosql.export.monitoring’ saved [22085]
WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.2.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 12-07-2016
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for service 'Users' on host '<hostname-17>' (config file '/usr/local/nagios/etc/services/ssc-prd-dmav2-017.ba.ssa.gov.cfg', starting on line 272)
Warning: Duplicate definition found for service '/home Disk Usage' on host '<hostname-016>' (config file '/usr/local/nagios/etc/services/ssc-prd-dmav2-017.ba.ssa.gov.cfg', starting on line 32)
Warning: Duplicate definition found for service '/ Disk Usage' on host '<hostname-017>' (config file '/usr/local/nagios/etc/services/ssc-prd-dmav2-017.ba.ssa.gov.cfg', starting on line 16)
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 46 services.
Checked 3 hosts.
Checked 2 host groups.
Checked 0 service groups.
Checked 5 contacts.
Checked 3 contact groups.
Checked 125 commands.
Checked 11 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 3 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 11 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
RET: 0
OUTPUT=RET: 0
RETURNCODE=0
.PROCESSING COMMAND ID 621...
Thanks.
-
hsauerbach
- Posts: 39
- Joined: Thu Apr 20, 2017 9:19 am
Re: databases
we tried to add our client disks just from one client and the first one worked and the second one did not.
client services file looks like:
define service {
host_name <Client Hostname>
service_description / Disk Info
use generic-service
check_command check_nrpe!check_hda1!-a '-w 20% -c 10% -p /dev/mapper/sysvg-lv_root'!!!!!!
register 1
}
define service {
host_name <Client Hostname>
service_description /home Disk Info
use generic-service
check_command check_nrpe!check_hda2!-a '-w 20% -c 10% -p /dev/mapper/sysvg-lv_home'!!!!!!
register 1
}
the nagiosql.tbl_service table was updated but the nagios.nagios_services did not???
hda1 works and hda2 doesn't work with an error check_disk undefined. Also under adding commands when run check command both disk commands work???
client services file looks like:
define service {
host_name <Client Hostname>
service_description / Disk Info
use generic-service
check_command check_nrpe!check_hda1!-a '-w 20% -c 10% -p /dev/mapper/sysvg-lv_root'!!!!!!
register 1
}
define service {
host_name <Client Hostname>
service_description /home Disk Info
use generic-service
check_command check_nrpe!check_hda2!-a '-w 20% -c 10% -p /dev/mapper/sysvg-lv_home'!!!!!!
register 1
}
the nagiosql.tbl_service table was updated but the nagios.nagios_services did not???
hda1 works and hda2 doesn't work with an error check_disk undefined. Also under adding commands when run check command both disk commands work???
Re: databases
In your output from the cmdsubsys.log file looks like the time is not set correctly on the server so follow through this document to setup the time and time zone on the server.
https://assets.nagios.com/downloads/nag ... m_Time.pdf
This error
hda1 works and hda2 doesn't work with an error check_disk undefined. Also under adding commands when run check command both disk commands work???
is probably caused be the check_hda2 command is not defined in the NRPE Agent on the remote server.
Take a look at the nrpe.cfg file on the remote server and either define an hda2 command or setup a generic check_disk command and use that instead.
Here is an example check_disk command for the nrpe.cfg file
Remember, after doing any changes to the nrpe.cfg file, you will have to restart the nrpe agent.
Then you would change your check_command from
to
Save it and that should use the generic check_disk command defined on the remote system.
https://assets.nagios.com/downloads/nag ... m_Time.pdf
This error
hda1 works and hda2 doesn't work with an error check_disk undefined. Also under adding commands when run check command both disk commands work???
is probably caused be the check_hda2 command is not defined in the NRPE Agent on the remote server.
Take a look at the nrpe.cfg file on the remote server and either define an hda2 command or setup a generic check_disk command and use that instead.
Here is an example check_disk command for the nrpe.cfg file
Code: Select all
command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$Then you would change your check_command from
Code: Select all
check_command check_nrpe!check_hda2!-a '-w 20% -c 10% -p /dev/mapper/sysvg-lv_home'!!!!!!Code: Select all
check_command check_nrpe!check_disk!-a '-w 20% -c 10% -p /dev/mapper/sysvg-lv_home'!!!!!!
Last edited by dwhitfield on Mon May 15, 2017 3:27 pm, edited 1 time in total.
Reason: NREP to NRPE
Reason: NREP to NRPE
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
hsauerbach
- Posts: 39
- Joined: Thu Apr 20, 2017 9:19 am
Re: databases
Our Timezone is fine:
Mon May 15 16:13:11 EDT 2017
-bash-4.2$ timedatectl
Local time: Mon 2017-05-15 16:13:30 EDT
Universal time: Mon 2017-05-15 20:13:30 UTC
RTC time: Mon 2017-05-15 20:13:30
Time zone: US/Eastern (EDT, -0400)
NTP enabled: yes
NTP synchronized: no
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2017-03-12 01:59:59 EST
Sun 2017-03-12 03:00:00 EDT
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2017-11-05 01:59:59 EDT
Sun 2017-11-05 01:00:00 EST
From Console System Settings:
Timezone UTC-05:00 Eastern Time (US & Canada).
Our timezone is fine.
For the disk monitoring we will try what you suggested. Thanks.
Mon May 15 16:13:11 EDT 2017
-bash-4.2$ timedatectl
Local time: Mon 2017-05-15 16:13:30 EDT
Universal time: Mon 2017-05-15 20:13:30 UTC
RTC time: Mon 2017-05-15 20:13:30
Time zone: US/Eastern (EDT, -0400)
NTP enabled: yes
NTP synchronized: no
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2017-03-12 01:59:59 EST
Sun 2017-03-12 03:00:00 EDT
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2017-11-05 01:59:59 EDT
Sun 2017-11-05 01:00:00 EST
From Console System Settings:
Timezone UTC-05:00 Eastern Time (US & Canada).
Our timezone is fine.
For the disk monitoring we will try what you suggested. Thanks.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: databases
There error is specifically about date.timezone in /etc/php.ini, which you didn't give us. It's on page 4 of that time document. PHP thinks you are in UTC, according to the error. Whether that is due to /etc/php.ini not being set, or for some other reason, it's hard to know right now.
We've also seen a lot of problems with time on RHEV specifically. Does the output of hwclock match the output of date?
It also says you aren't NTP synchronized, which is a little bit suspicious, but might be ok.
We've also seen a lot of problems with time on RHEV specifically. Does the output of hwclock match the output of date?
It also says you aren't NTP synchronized, which is a little bit suspicious, but might be ok.
-
hsauerbach
- Posts: 39
- Joined: Thu Apr 20, 2017 9:19 am
Re: databases
Ok that didn't work, we still get "NRPE: Command 'check_disk' not defined" Nagios Web UI whereas when we run from the command line its working fine.
/usr/local/nagios/libexec/check_nrpe -H xx.xx.xx.xx -c check_disk -a '-w 20% -c 10% -p /dev/mapper/sysvg-lv_home'
DISK OK - free space: /home 7217 MB (95.89% inode=100%);| /home=308MB;6348;7141;0;7935
From the nagios server where the service for remote host we are monitoring disk is defined.
define service {
host_name xxxxxxx
service_description /home Disk Usage
use xiwizard_nrpe_service
check_command check_nrpe!check_disk!-a '-w 20% -c 10% -p /dev/mapper/sysvg-lv_home'!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard linux-server
register 1
}
This is what we have in the nrpe.cfg file of both nagios server and remote host:
command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
In MySQL -- nagiosql.tbl_service table is being updated but nagios.nagios_services is NOT updating is it suppose too?
Thanks
/usr/local/nagios/libexec/check_nrpe -H xx.xx.xx.xx -c check_disk -a '-w 20% -c 10% -p /dev/mapper/sysvg-lv_home'
DISK OK - free space: /home 7217 MB (95.89% inode=100%);| /home=308MB;6348;7141;0;7935
From the nagios server where the service for remote host we are monitoring disk is defined.
define service {
host_name xxxxxxx
service_description /home Disk Usage
use xiwizard_nrpe_service
check_command check_nrpe!check_disk!-a '-w 20% -c 10% -p /dev/mapper/sysvg-lv_home'!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard linux-server
register 1
}
This is what we have in the nrpe.cfg file of both nagios server and remote host:
command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
In MySQL -- nagiosql.tbl_service table is being updated but nagios.nagios_services is NOT updating is it suppose too?
Thanks
-
hsauerbach
- Posts: 39
- Joined: Thu Apr 20, 2017 9:19 am
Re: databases
I sent to dwhitfield a copy of my php.ini file
Re: databases
Can you provide a screen capture of the error or an updated system profile we can check it's configurations?
Be sure to check out our Knowledgebase for helpful articles and solutions!