Page 3 of 4

Re: NCPA v2.1.4 not detecting NFS v3 mounts

Posted: Fri Aug 24, 2018 1:11 pm
by ssax
Hmm, let's try running this command from the XI server and send the resulting /tmp/ncpa_out.txt file:
- Make sure to change the IP and the mytoken

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H 192.168.X.X -M disk -l -t mytoken > /tmp/ncpa_out.txt 

Re: NCPA v2.1.4 not detecting NFS v3 mounts

Posted: Sat Aug 25, 2018 3:16 pm
by madhu2852
Requested output is in the attachment.

Also df output from the server which is having issues.

df -h
XXXfilesntap01:/nfs_YYY_data 100G 19G 82G 19% /mnt/YYY/data
XXXfilesntap01:/nfs_YYY_data_logs 100G 52G 49G 52% /mnt/YYY/logs

Re: NCPA v2.1.4 not detecting NFS v3 mounts

Posted: Mon Aug 27, 2018 4:48 pm
by scottwilkerson
Does your nagios users see these mounts?

Code: Select all

su nagios
df -h

Re: NCPA v2.1.4 not detecting NFS v3 mounts

Posted: Tue Aug 28, 2018 10:03 am
by madhu2852
yes i'm able to see them as nagios user

[nagios@XXX ~]$ df -h| egrep "logs|data"
XXXfilesntap01:/nfs_XXX_data 100G 18G 83G 18% /mnt/XXX/data
XXXfilesntap01:/nfs_XXX_data_logs 100G 54G 47G 54% /mnt/XXX/logs

Re: NCPA v2.1.4 not detecting NFS v3 mounts

Posted: Tue Aug 28, 2018 10:56 am
by scottwilkerson
If your previous message you showed
madhu2852 wrote:XXXfilesntap01:/nfs_YYY_data 100G 19G 82G 19% /mnt/YYY/data
XXXfilesntap01:/nfs_YYY_data_logs 100G 52G 49G 52% /mnt/YYY/logs
in the last message you showed
madhu2852 wrote:XXXfilesntap01:/nfs_XXX_data 100G 18G 83G 18% /mnt/XXX/data
XXXfilesntap01:/nfs_XXX_data_logs 100G 54G 47G 54% /mnt/XXX/logs
In the ncpa_out.txt you posted I can see a logical drive for |mnt|XXX|logs/

but not the |mnt|XXX|data/

are these setup the same?

Re: NCPA v2.1.4 not detecting NFS v3 mounts

Posted: Tue Aug 28, 2018 11:49 am
by madhu2852
mount with nfs v3 is not present in the text file i shared with you.

Re: NCPA v2.1.4 not detecting NFS v3 mounts

Posted: Wed Aug 29, 2018 8:57 am
by scottwilkerson
Earlier in this thread we had you go into the python terminal and run the following commands and you could see the mounts

Code: Select all

import psutil
psutil.disk_partitions(all=True)
Could you switch to the nagios user and do the same command

Code: Select all

su - nagios
python
import psutil
psutil.disk_partitions(all=True)

Re: NCPA v2.1.4 not detecting NFS v3 mounts

Posted: Wed Aug 29, 2018 12:42 pm
by madhu2852
yes im able to see the mounts as nagios as well as normal user

Re: NCPA v2.1.4 not detecting NFS v3 mounts

Posted: Thu Aug 30, 2018 1:39 pm
by scottwilkerson
I just tried to re-create this using the latest ncpa and I can see the drive just fine

Code: Select all

mount 
XXX.XXX.XXX.XXX:/volume2/videodata.N1_PRODUCTION on /store/vmbackups type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=XXX.XXX.XXX.XXX,mountvers=3,local_lock=none,nolock,addr=XXX.XXX.XXX.XXX)
In the API the drive shows as a logical drive

Can you share your /usr/local/ncpa/etc/ncpa.cfg obfuscating your token?

Re: NCPA v2.1.4 not detecting NFS v3 mounts

Posted: Fri Sep 07, 2018 5:01 pm
by madhu2852
cat /usr/local/ncpa/etc/ncpa.cfg
#
# NCPA Main Config File
# ---------------------
#

#
# -------------------------------
# General Configuration
# -------------------------------
#

[general]

#
# Check logging is on by default, you can disable it if you do not want to record
# the check requests that are coming in or checks being sent over NRDP.
# Default: check_logging = 1
#
check_logging = 1

#
# Check logging time - how long in DAYS you'd like to keep checks in the database.
# Default: 30
#
check_logging_time = 30

#
# -------------------------------
# Listener Configuration (daemon)
# -------------------------------
#

[listener]

#
# User and group to run plugins as (recommended to use nagios:nagios)
# Default: uid = nagios
# Default: gid = nagios
#
# ** Note - The daemon runs as root, but forks a child process when running a plugin
# that is defined by the user, for security reasons. However, without the main daemon
# running as root, much of the system information would be missing. This is typical behavior. **
#
# This is for Unix only (Linux, Mac OS X, etc)
#
uid = nagios
gid = docker

#
# IP address and port number for the Listener to use for the web GUI and API
# Default: ip = 0.0.0.0
# Default: port = 5693
#
ip = 0.0.0.0
port = 5693

#
# SSL connection and certificate config (if an SSL option is not available on some older
# operating systems it will default back to TLSv1)
# ssl_version options: TLSv1, TLSv1_1, TLSv1_2
#
ssl_version = TLSv1_2
certificate = adhoc

#
# Listener logging file level, location, and the PID location
# Default: loglevel = info (debug, info, warning, error)
# Default: logfile = var/log/ncpa_listener.log
# Default: pidfile = var/run/ncpa_listener.pid (leave listener in pid file name)
#
loglevel = info
logfile = var/log/ncpa_listener.log
pidfile = var/run/ncpa_listener.pid

#
# Delay the listener (API & web GUI) from starting in seconds
# Default: 0
#
# delay_start = 30

#
# Allow admin functionality in the web GUI. When this is set to 0, the admin section will not
# be displayed in the header and will not be available to be accessed.
# Default: 1
#
admin_gui_access = 1

#
# Admin password for the admin section in the web GUI, by default there is no admin
# password and the admin section of the GUI can be accessed by anyone if admin_gui_access is set to 1.
# Default: None
#
# Note: Setting this value to 'None' will automatically log you in, setting it empty will allow you to
# log in using a blank password.
#
admin_password = None

#
# Require admin password to access ALL of the web GUI.
# This does not affect API access via token (community_string).
# Default: 0
#
admin_auth_only = 0

#
# -------------------------------
# Listener Configuration (API)
# -------------------------------
#
#exclude_fs_types = aufs,autofs,binfmt_misc,cifs,cgroup,debugfs,devpts,devtmpfs,encryptfs,efivarfs,fuse,hugelbtfs,mqueue,overlayfs,proc,pstore,rpc_pipefs,securityfs,smb,sysfs,tmpfs,tracefs
exclude_fs_types = testdebug
[api]

#
# The token that will be used to log into the basic web GUI (API browser, graphs, top charts, etc)
# and to authenticate requests to the API and requests through check_ncpa.py
#
community_string = XXXX

#
# -------------------------------
# Passive Configuration (daemon)
# -------------------------------
#

[passive]

#
# Handlers are a comma separated list of what you would like the passive agent to run
# Default: None
# Options:
# nrds, nrdp
#
# Example:
# handlers = nrds,nrdp
#
handlers = None

#
# User and group to run passive checks as (Recommended to use nagios:nagios)
# Default: uid = nagios
# Default: gid = nagios
#
#uid = nagios
#gid = docker
uid = root
gid = root
#
# Passive check interval - the amount in seconds to wait between each passive check by default,
# this can be overwritten by adding on a "|<duration>" in seconds to the passive check config
# Default: 300 (5 minutes)
#
sleep = 300

#
# Passive logging file level, location, and the PID location
# Default: loglevel = info (debug, info, warning, error)
# Default: logfile = var/log/ncpa_passive.log
# Default: pidfile = var/run/ncpa_passive.pid (leave passive in pid file name)
#
loglevel = info
logfile = var/log/ncpa_passive.log
pidfile = var/run/ncpa_passive.pid

#
# Delay passive checks from starting in seconds
# Default: 0
#
# delay_start = 30

#
# -------------------------------
# Passive Configuration (NRDP)
# -------------------------------
#

[nrdp]

#
# Connection settings to the NRDP server
# parent = NRDP server location (ex: http://<address>/nrdp)
# token = NRDP server token used to send NRDP results
#
parent =
token =

#
# The hostname that will replace %HOSTNAME% in the check definitions and will be
# sent to NRDP with the check name as the service description (service name)
#
hostname = NCPA 2

#
# -------------------------------
# Passive Configuration (NRDS)
# -------------------------------
#

[nrds]

#
# NRDS CONFIGURATION DOES NOT WORK YET. MORE TO COME IN VERSION 2.1.0.
#

#
# NRDS connection information
#
url =
token =
config_name =
config_version =
update_config = 1
update_plugins = 1

#
# -------------------------------
# Plugin Configuration
# -------------------------------
#

[plugin directives]

#
# Plugin path where all plugins will be ran from.
#
plugin_path = plugins/

#
# Plugin execution timeout in seconds. Different than the check_ncpa.py timeout, which is
# normally for network connection issues. Will return a CRITICAL value and error when the plugin
# reaches the defined max execution timeout and kills the process.
# Default: 60
#
# plugin_timeout = 60

#
# Extensions for plugins
# ----------------------
# The extension for the plugin denotes how NCPA will try to run the plugin. Use this
# for setting how you want to run the plugin in the command line.
#
# NOTE: Plugins without an extension will be ran in the cmdline as follows:
# $plugin_name $plugin_args
#
# Defaults:
# .sh = /bin/sh $plugin_name $plugin_args
# .py = python $plugin_name $plugin_args
# .ps1 = powershell -ExecutionPolicy Bypass -File $plugin_name $plugin_args
# .vbs = cscript $plugin_name $plugin_args //NoLogo
# .bat = cmd /c $plugin_name $plugin_args
#
# Since windows NCPA is 32-bit, if you need to use 64-bit powershell, try the following for
# the powershell plugin definition:
# .ps1 = c:\windows\sysnative\windowspowershell\v1.0\powershell.exe -ExecutionPolicy Unrestricted -File $plugin_name $plugin_args
#

# Linux / Mac OS X
.sh = /bin/sh $plugin_name $plugin_args
.py = python $plugin_name $plugin_args

# Windows
.ps1 = powershell -ExecutionPolicy Bypass -File $plugin_name $plugin_args
.vbs = cscript $plugin_name $plugin_args //NoLogo
.bat = cmd /c $plugin_name $plugin_args