Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NCPA not working properly #643

Closed
sowmian opened this issue Jun 17, 2020 · 37 comments
Closed

NCPA not working properly #643

sowmian opened this issue Jun 17, 2020 · 37 comments

Comments

@sowmian
Copy link

sowmian commented Jun 17, 2020

[nagios@manxi01.marketingassociates.com ~]$ /usr/local/nagios/libexec/check_ncpa.py -H vendprodcdb.marketingassociates.com -t 'mytoken12345' -P 5693 -M 'disk/logical/|mnt|oracledump' -w 80 -c 90
UNKNOWN: The node (/mnt/oracledump) requested does not exist. You may be trying to access the '/' node.

[root@manxi01 ~]# /usr/local/nagios/libexec/check_ncpa.py -H vendprodcdb.marketingassociates.com -t 'mytoken12345' -P 5693 -M 'disk/logical/|mnt|oracledump' -w 80 -c 90 -v -D
Connecting to: https://vendprodcdb.marketingassociates.com:5693/api/disk/logical/%7Cmnt%7Coracledump/?token=mytoken12345&warning=80&critical=90&check=1
File returned contained:
{
"returncode": 3,
"stdout": "UNKNOWN: The node (/mnt/oracledump) requested does not exist. You may be trying to access the '/' node."
}
UNKNOWN: The node (/mnt/oracledump) requested does not exist. You may be trying to access the '/' node.

@sowmian
Copy link
Author

sowmian commented Jun 17, 2020

df -gt

Filesystem GB blocks Used Free %Used Mounted on
/dev/hd4 55.50 13.53 41.97 25% /
/dev/hd2 7.50 4.15 3.35 56% /usr
/dev/hd9var 5.50 2.02 3.48 37% /var
/dev/hd3 8.50 3.43 5.07 41% /tmp
/dev/hd1 50.50 33.70 16.80 67% /home
/dev/hd11admin 0.50 0.00 0.50 1% /admin
/proc - - - - /proc
/dev/hd10opt 115.50 52.50 63.00 46% /opt
/dev/livedump 0.50 0.00 0.50 1% /var/adm/ras/livedump
/dev/fslv00 15.00 0.00 15.00 1% /export/eznim
/dev/fslv01 0.50 0.00 0.50 1% /tftpboot
/dev/u01lv 9.50 0.92 8.58 10% /u01
/dev/diaglv 32.50 6.38 26.12 20% /u01/app/oracle/diag
/dev/girddiaglv 32.50 2.60 29.90 9% /u01/app/grid/diag
/dev/gridproductlv 95.50 71.36 24.14 75% /u01/app/grid/product
/dev/productlv 95.50 48.10 47.40 51% /u01/app/oracle/product
detnas.onemagnify.corp:/dbrestore 125989.69 36621.65 89368.04 30% /mnt/dbrestore
detnas.onemagnify.corp:/vendavo_eu 125989.69 36621.65 89368.04 30% /mnt/Vendavo_EU
detnas.onemagnify.corp:/vendavo_ap 125989.69 36621.65 89368.04 30% /mnt/Vendavo_AP
detnas.onemagnify.corp:/vendavo_gp 125989.69 36621.65 89368.04 30% /mnt/Vendavo_GP
detnas.onemagnify.corp:/vendavo_fna 125989.69 36621.65 89368.04 30% /mnt/Vendavo_FNA
10.95.252.57:/oracledumpvol_fs 8192.00 3585.01 4606.99 44% /mnt/oracledump

mount

node mounted mounted over vfs date options


     /dev/hd4         /                jfs2   Jun 14 01:25 rw,log=/dev/hd8
     /dev/hd2         /usr             jfs2   Jun 14 01:25 rw,log=/dev/hd8
     /dev/hd9var      /var             jfs2   Jun 14 01:25 rw,log=/dev/hd8
     /dev/hd3         /tmp             jfs2   Jun 14 01:25 rw,log=/dev/hd8
     /dev/hd1         /home            jfs2   Jun 14 01:25 rw,log=/dev/hd8
     /dev/hd11admin   /admin           jfs2   Jun 14 01:25 rw,log=/dev/hd8
     /proc            /proc            procfs Jun 14 01:25 rw
     /dev/hd10opt     /opt             jfs2   Jun 14 01:25 rw,log=/dev/hd8
     /dev/livedump    /var/adm/ras/livedump jfs2   Jun 14 01:25 rw,log=/dev/hd8
     /dev/fslv00      /export/eznim    jfs2   Jun 14 01:25 rw,log=/dev/hd8
     /dev/fslv01      /tftpboot        jfs2   Jun 14 01:25 rw,log=/dev/hd8
     /dev/u01lv       /u01             jfs2   Jun 14 01:25 rw,log=INLINE
     /dev/diaglv      /u01/app/oracle/diag jfs2   Jun 14 01:25 rw,log=INLINE
     /dev/girddiaglv  /u01/app/grid/diag jfs2   Jun 14 01:25 rw,log=INLINE
     /dev/gridproductlv /u01/app/grid/product jfs2   Jun 14 01:25 rw,log=INLINE
     /dev/productlv   /u01/app/oracle/product jfs2   Jun 14 01:25 rw,log=INLINE

detnas.onemagnify.corp /dbrestore /mnt/dbrestore nfs3 Jun 14 01:26 rw,bg,hard,rsize=32768,wsize=32768,timeo=600,vers=3,sec=sys
detnas.onemagnify.corp /vendavo_eu /mnt/Vendavo_EU nfs3 Jun 14 01:26 bg,hard,intr,rsize=32768,wsize=32768,vers=3,proto=tcp,sec=sys,rw,acdirmax=30
detnas.onemagnify.corp /vendavo_ap /mnt/Vendavo_AP nfs3 Jun 14 01:26 bg,hard,intr,rsize=32768,wsize=32768,vers=3,proto=tcp,sec=sys,rw,acdirmax=30
detnas.onemagnify.corp /vendavo_gp /mnt/Vendavo_GP nfs3 Jun 14 01:26 bg,hard,intr,rsize=32768,wsize=32768,vers=3,proto=tcp,sec=sys,rw,acdirmax=30
detnas.onemagnify.corp /vendavo_fna /mnt/Vendavo_FNA nfs3 Jun 14 01:26 bg,hard,intr,rsize=32768,wsize=32768,vers=3,proto=tcp,rw
10.95.252.57 /oracledumpvol_fs /mnt/oracledump nfs3 Jun 17 13:10

df -gt /mnt/oracledump

Filesystem GB blocks Used Free %Used Mounted on
10.95.252.57:/oracledumpvol_fs 8192.00 3585.01 4606.99 44% /mnt/oracledump

date

Wed Jun 17 13:14:05 EDT 2020

@sowmian
Copy link
Author

sowmian commented Jun 17, 2020

rpm -qa|grep -i ncpa

ncpa-2.2.1-1.ppc

oslevel -s

7100-05-05-1939

hostname

vendprodcdb.marketingassociates.com

uname -uM

IBM,9119-MHE IBM,02219A857

prtconf|head -15

System Model: IBM,9119-MHE
Machine Serial Number: 219A857
Processor Type: PowerPC_POWER8
Processor Implementation Mode: POWER 8
Processor Version: PV_8_Compat
Number Of Processors: 36
Processor Clock Speed: 4356 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 17 vendprodcdb
Memory Size: 2097152 MB
Good Memory Size: 2097152 MB
Platform Firmware level: SC860_138
Firmware Version: IBM,FW860.42 (SC860_138)
Console Login: enable
/usr/sbin/prtconf: There is no process to read data written to a pipe.

date

Wed Jun 17 15:48:09 EDT 2020

@ccztux
Copy link
Contributor

ccztux commented Aug 9, 2020

Will the montpoint be shown in the output of the following command?:

/usr/local/nagios/libexec/check_ncpa.py -H vendprodcdb.marketingassociates.com -t 'mytoken12345' -P 5693 -M 'disk/logical' -l

@sowmian
Copy link
Author

sowmian commented Aug 10, 2020

I dont see that mountpoint on this above command output

[root@manxi01 ~]# /usr/local/nagios/libexec/check_ncpa.py -H vendprodcdb.marketingassociates.com -t 'mytoken12345' -P 5693 -M 'disk/logical' -l
{
"logical": {
"|var": {
"used_percent": [
36.3,
"%"
],
"used": [
2.0,
"GiB"
],
"inodes_used": [
9109,
"inodes"
],
"free": [
3.5,
"GiB"
],
"device_name": [
"/dev/hd9var"
],
"inodes_free": [
835384,
"inodes"
],
"inodes": [
844493,
"inodes"
],
"fstype": "jfs2",
"total": [
5.5,
"GiB"
],
"opts": "default"
},
"|opt": {
"used_percent": [
45.8,
"%"
],
"used": [
52.93,
"GiB"
],
"inodes_used": [
16195,
"inodes"
],
"free": [
62.55,
"GiB"
],
"device_name": [
"/dev/hd10opt"
],
"inodes_free": [
14601049,
"inodes"
],
"inodes": [
14617244,
"inodes"
],
"fstype": "jfs2",
"total": [
115.47,
"GiB"
],
"opts": "default"
},
"|proc": {
"used_percent": [
100.0,
"%"
],
"used": [
4095.02,
"GiB"
],
"inodes_used": [
0,
"inodes"
],
"free": [
0.0,
"GiB"
],
"device_name": [
"/proc"
],
"inodes_free": [
0,
"inodes"
],
"inodes": [
0,
"inodes"
],
"fstype": "procfs",
"total": [
4095.02,
"GiB"
],
"opts": "default"
},
"|mnt|Vendavo_AP": {
"used_percent": [
32.2,
"%"
],
"used": [
40513.36,
"GiB"
],
"inodes_used": [
0,
"inodes"
],
"free": [
85408.06,
"GiB"
],
"device_name": [
"/vendavo_ap"
],
"inodes_free": [
4293918720,
"inodes"
],
"inodes": [
4293918720,
"inodes"
],
"fstype": "nfs",
"total": [
125921.41,
"GiB"
],
"opts": "bg,hard,intr,rsize=32768,wsize=32768,vers=3,proto=tcp,sec=sys,rw,acdirmax=30"
},
"|var|adm|ras|livedump": {
"used_percent": [
0.1,
"%"
],
"used": [
0.0,
"GiB"
],
"inodes_used": [
4,
"inodes"
],
"free": [
0.5,
"GiB"
],
"device_name": [
"/dev/livedump"
],
"inodes_free": [
116445,
"inodes"
],
"inodes": [
116449,
"inodes"
],
"fstype": "jfs2",
"total": [
0.5,
"GiB"
],
"opts": "default"
},
"|u01|app|grid|diag": {
"used_percent": [
8.6,
"%"
],
"used": [
2.8,
"GiB"
],
"inodes_used": [
386351,
"inodes"
],
"free": [
29.69,
"GiB"
],
"device_name": [
"/dev/girddiaglv"
],
"inodes_free": [
6921029,
"inodes"
],
"inodes": [
7307380,
"inodes"
],
"fstype": "jfs2",
"total": [
32.49,
"GiB"
],
"opts": "rw"
},
"|u01|app|oracle|product": {
"used_percent": [
50.4,
"%"
],
"used": [
48.1,
"GiB"
],
"inodes_used": [
168994,
"inodes"
],
"free": [
47.37,
"GiB"
],
"device_name": [
"/dev/productlv"
],
"inodes_free": [
11124763,
"inodes"
],
"inodes": [
11293757,
"inodes"
],
"fstype": "jfs2",
"total": [
95.48,
"GiB"
],
"opts": "rw"
},
"|u01": {
"used_percent": [
9.4,
"%"
],
"used": [
0.89,
"GiB"
],
"inodes_used": [
17334,
"inodes"
],
"free": [
8.6,
"GiB"
],
"device_name": [
"/dev/u01lv"
],
"inodes_free": [
2049207,
"inodes"
],
"inodes": [
2066541,
"inodes"
],
"fstype": "jfs2",
"total": [
9.5,
"GiB"
],
"opts": "rw"
},
"|home": {
"used_percent": [
66.7,
"%"
],
"used": [
33.69,
"GiB"
],
"inodes_used": [
15214,
"inodes"
],
"free": [
16.8,
"GiB"
],
"device_name": [
"/dev/hd1"
],
"inodes_free": [
3973495,
"inodes"
],
"inodes": [
3988709,
"inodes"
],
"fstype": "jfs2",
"total": [
50.49,
"GiB"
],
"opts": "default"
},
"|mnt|AIXTools": {
"used_percent": [
32.2,
"%"
],
"used": [
40513.36,
"GiB"
],
"inodes_used": [
0,
"inodes"
],
"free": [
85408.06,
"GiB"
],
"device_name": [
"/AIXTools"
],
"inodes_free": [
4293918720,
"inodes"
],
"inodes": [
4293918720,
"inodes"
],
"fstype": "nfs",
"total": [
125921.41,
"GiB"
],
"opts": "bg,hard,intr,sec=sys"
},
"|u01|app|oracle|diag": {
"used_percent": [
7.9,
"%"
],
"used": [
2.57,
"GiB"
],
"inodes_used": [
84248,
"inodes"
],
"free": [
29.92,
"GiB"
],
"device_name": [
"/dev/diaglv"
],
"inodes_free": [
7615870,
"inodes"
],
"inodes": [
7700118,
"inodes"
],
"fstype": "jfs2",
"total": [
32.49,
"GiB"
],
"opts": "rw"
},
"|mnt|dbrestore": {
"used_percent": [
32.2,
"%"
],
"used": [
40513.36,
"GiB"
],
"inodes_used": [
0,
"inodes"
],
"free": [
85408.06,
"GiB"
],
"device_name": [
"/dbrestore"
],
"inodes_free": [
4293918720,
"inodes"
],
"inodes": [
4293918720,
"inodes"
],
"fstype": "nfs",
"total": [
125921.41,
"GiB"
],
"opts": "rw,bg,hard,rsize=32768,wsize=32768,timeo=600,vers=3,sec=sys"
},
"|mnt|Vendavo_GP": {
"used_percent": [
32.2,
"%"
],
"used": [
40513.36,
"GiB"
],
"inodes_used": [
0,
"inodes"
],
"free": [
85408.06,
"GiB"
],
"device_name": [
"/vendavo_gp"
],
"inodes_free": [
4293918720,
"inodes"
],
"inodes": [
4293918720,
"inodes"
],
"fstype": "nfs",
"total": [
125921.41,
"GiB"
],
"opts": "bg,hard,intr,rsize=32768,wsize=32768,vers=3,proto=tcp,sec=sys,rw,acdirmax=30"
},
"|mnt|Vendavo_EU": {
"used_percent": [
32.2,
"%"
],
"used": [
40513.36,
"GiB"
],
"inodes_used": [
0,
"inodes"
],
"free": [
85408.06,
"GiB"
],
"device_name": [
"/vendavo_eu"
],
"inodes_free": [
4293918720,
"inodes"
],
"inodes": [
4293918720,
"inodes"
],
"fstype": "nfs",
"total": [
125921.41,
"GiB"
],
"opts": "bg,hard,intr,rsize=32768,wsize=32768,vers=3,proto=tcp,sec=sys,rw,acdirmax=30"
},
"|u01|app|grid|product": {
"used_percent": [
74.5,
"%"
],
"used": [
71.13,
"GiB"
],
"inodes_used": [
72064,
"inodes"
],
"free": [
24.35,
"GiB"
],
"device_name": [
"/dev/gridproductlv"
],
"inodes_free": [
5789248,
"inodes"
],
"inodes": [
5861312,
"inodes"
],
"fstype": "jfs2",
"total": [
95.48,
"GiB"
],
"opts": "rw"
},
"|usr": {
"used_percent": [
54.5,
"%"
],
"used": [
4.09,
"GiB"
],
"inodes_used": [
76457,
"inodes"
],
"free": [
3.41,
"GiB"
],
"device_name": [
"/dev/hd2"
],
"inodes_free": [
846060,
"inodes"
],
"inodes": [
922517,
"inodes"
],
"fstype": "jfs2",
"total": [
7.5,
"GiB"
],
"opts": "default"
},
"|tftpboot": {
"used_percent": [
0.1,
"%"
],
"used": [
0.0,
"GiB"
],
"inodes_used": [
4,
"inodes"
],
"free": [
0.5,
"GiB"
],
"device_name": [
"/dev/fslv01"
],
"inodes_free": [
116445,
"inodes"
],
"inodes": [
116449,
"inodes"
],
"fstype": "jfs2",
"total": [
0.5,
"GiB"
],
"opts": "rw"
},
"|tmp": {
"used_percent": [
42.6,
"%"
],
"used": [
3.62,
"GiB"
],
"inodes_used": [
13591,
"inodes"
],
"free": [
4.88,
"GiB"
],
"device_name": [
"/dev/hd3"
],
"inodes_free": [
1143194,
"inodes"
],
"inodes": [
1156785,
"inodes"
],
"fstype": "jfs2",
"total": [
8.5,
"GiB"
],
"opts": "default"
},
"|export|eznim": {
"used_percent": [
0.0,
"%"
],
"used": [
0.0,
"GiB"
],
"inodes_used": [
4,
"inodes"
],
"free": [
14.99,
"GiB"
],
"device_name": [
"/dev/fslv00"
],
"inodes_free": [
3494675,
"inodes"
],
"inodes": [
3494679,
"inodes"
],
"fstype": "jfs2",
"total": [
15.0,
"GiB"
],
"opts": "rw"
},
"|mnt|Vendavo_FNA": {
"used_percent": [
32.2,
"%"
],
"used": [
40513.36,
"GiB"
],
"inodes_used": [
0,
"inodes"
],
"free": [
85408.06,
"GiB"
],
"device_name": [
"/vendavo_fna"
],
"inodes_free": [
4293918720,
"inodes"
],
"inodes": [
4293918720,
"inodes"
],
"fstype": "nfs",
"total": [
125921.41,
"GiB"
],
"opts": "bg,hard,intr,rsize=32768,wsize=32768,vers=3,proto=tcp"
},
"|": {
"used_percent": [
24.4,
"%"
],
"used": [
13.52,
"GiB"
],
"inodes_used": [
43788,
"inodes"
],
"free": [
41.96,
"GiB"
],
"device_name": [
"/dev/hd4"
],
"inodes_free": [
9805288,
"inodes"
],
"inodes": [
9849076,
"inodes"
],
"fstype": "jfs2",
"total": [
55.49,
"GiB"
],
"opts": "default"
},
"|admin": {
"used_percent": [
0.1,
"%"
],
"used": [
0.0,
"GiB"
],
"inodes_used": [
17,
"inodes"
],
"free": [
0.5,
"GiB"
],
"device_name": [
"/dev/hd11admin"
],
"inodes_free": [
116488,
"inodes"
],
"inodes": [
116505,
"inodes"
],
"fstype": "jfs2",
"total": [
0.5,
"GiB"
],
"opts": "default"
}
}
}

But Still the mount point exist on the server.

vendprodcdb.marketingassociates.com
10.95.252.57:/oracledumpvol_fs 8192.00 1105.19 7086.81 14% /mnt/oracledump
Mon Aug 10 16:10:51 EDT 2020

Not sure why it is not getting monitored by nagios

@ccztux
Copy link
Contributor

ccztux commented Aug 11, 2020

I found this line in previous posts from you:

 10.95.252.57 /oracledumpvol_fs /mnt/oracledump nfs3 Jun 17 13:10

Is this mountpoint a nfs share? If it is a nfs share, can you try to set all_partitions = 1 and remove nfs from excluded_fs_types in ncpa.cfg:

#
# Display all mounted disk partitions
# (essentially setting all=True here: https://psutil.readthedocs.io/en/latest/#psutil.disk_partitions)
# Default: 1
#
all_partitions = 1

#
# Excluded file system types removes these fs types from the disk metrics
# (This is mostly only noteable on UNIX systems but also works on Windows if you need it)
# Default: aufs,autofs,binfmt_misc,cifs,cgroup,configfs,debugfs,devpts,devtmpfs,
#          encryptfs,efivarfs,fuse,fusectl,hugetlbfs,mqueue,nfs,overlayfs,proc,pstore,
#          rpc_pipefs,securityfs,selinuxfs,smb,sysfs,tmpfs,tracefs
#
exclude_fs_types = aufs,autofs,binfmt_misc,cifs,cgroup,configfs,debugfs,devpts,devtmpfs,encryptfs,efivarfs,fuse,fusectl,hugetlbfs,mqueue,nfs,overlayfs,proc,pstore,rpc_pipefs,securityfs,selinuxfs,smb,sysfs,tmpfs,tracefs

Then restart the ncpa_listener service and try it again.

@sowmian
Copy link
Author

sowmian commented Aug 13, 2020

Given setting is already set and is in place on the server.

cat /usr/local/ncpa/etc/ncpa.cfg|grep -i exclude

Excluded file system types removes these fs types from the disk metrics

exclude_fs_types = aufs,autofs,binfmt_misc,cgroup,configfs,debugfs,devpts,devtmpfs,encryptfs,efivarfs,fuse,fusectl,hugetlbfs,mqueue,overlayfs,proc,pstore,rpc_pipefs,securityfs,selinuxfs,smb,sysfs,tmpfs,tracefs
#exclude_fs_types = testdebug

cat /usr/local/ncpa/etc/ncpa.cfg|grep -i all_partitions

all_partitions = 1

hostname

vendprodcdb.marketingassociates.com

date

Thu Aug 13 13:29:16 EDT 2020

@sowmian
Copy link
Author

sowmian commented Aug 20, 2020

Any Update ?

@ccztux
Copy link
Contributor

ccztux commented Aug 20, 2020

Can you post the output of the following commands?:

ls -lah /proc/diskstats
cat /proc/diskstats
ls -lah /sys/block
ps aux | grep -i ncpa_listener

@sowmian
Copy link
Author

sowmian commented Aug 20, 2020

ls -lah /proc/diskstats

ls: Not a recognized flag: h
Usage: ls [-1ACFHLNRSabcdefgiklmnopqrstuxEUX] [File...]

ls -la /proc/diskstats

ls: 0653-341 The file /proc/diskstats does not exist.

cat /proc/diskstats

cat: 0652-050 Cannot open /proc/diskstats.

ls -la /sys/block

ls: 0653-341 The file /sys/block does not exist.

ps aux | grep -i ncpa_listener

ps -ef|grep -i ncpa_listener

nagios 6751022 5833536 0 Aug 09 - 47:33 /usr/local/ncpa/ncpa_listener -n
root 2361106 31327470 0 13:42:01 pts/1 0:00 grep -i ncpa_listener

date

Thu Aug 20 13:42:04 EDT 2020

@ccztux
Copy link
Contributor

ccztux commented Aug 20, 2020

Can you try to run ncpa with root priviliges?:

[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 = root
gid = root

@sowmian
Copy link
Author

sowmian commented Aug 20, 2020

I tried to run the ncpa agent with root privilage but once after changing the UID / GID to root I could see that the service is not comming up.

bash-4.2# lssrc -a|grep -i ncpa
ncpa_passive 5898946 active
ncpa_listener inoperative

@ccztux
Copy link
Contributor

ccztux commented Aug 20, 2020

Can you provide the latest lines of ncpa_listener.log when you have tried to start ncpa with root priviliges?

@sowmian
Copy link
Author

sowmian commented Aug 20, 2020

ncpa_listener.log

@ccztux
Copy link
Contributor

ccztux commented Aug 23, 2020

Can you set the loglevel in the listener section to debug and try to start the ncpa_listener with root privileges again? Maybe we see something in ncpa_listener.log

@sowmian
Copy link
Author

sowmian commented Aug 24, 2020

lssrc -a|grep -i ncpa

ncpa_passive 5898946 active
ncpa_listener 47776828 active

cat /usr/local/ncpa/etc/ncpa.cfg|grep -i loglevel

Default: loglevel = info (debug, info, warning, error)

loglevel = debug

Default: loglevel = info (debug, info, warning, error)

loglevel = debug

date

Mon Aug 24 10:29:55 EDT 2020

Please let us know the time duration for this debug logging.

@sowmian
Copy link
Author

sowmian commented Aug 24, 2020

ls -ltr /var/log/ncpa_listener.log

ls: 0653-341 The file /var/log/ncpa_listener.log does not exist.

date

Mon Aug 24 10:33:01 EDT 2020

I dont see any loging over here

@ccztux
Copy link
Contributor

ccztux commented Aug 24, 2020

lssrc -a|grep -i ncpa

ncpa_passive 5898946 active
ncpa_listener 47776828 active

cat /usr/local/ncpa/etc/ncpa.cfg|grep -i loglevel

Default: loglevel = info (debug, info, warning, error)

loglevel = debug

Default: loglevel = info (debug, info, warning, error)

loglevel = debug

date

Mon Aug 24 10:29:55 EDT 2020

Please let us know the time duration for this debug logging.

Is the ncpa_listener now running with root privileges?
The debug log would be interesting, because ncpa_listener wont start with root privileges.

@ccztux
Copy link
Contributor

ccztux commented Aug 24, 2020

ls -ltr /var/log/ncpa_listener.log

ls: 0653-341 The file /var/log/ncpa_listener.log does not exist.

date

Mon Aug 24 10:33:01 EDT 2020

I dont see any loging over here

The ncpa_listener.log is located under /usr/local/ncpa/var/log/

@sowmian
Copy link
Author

sowmian commented Aug 24, 2020

ncpa_listener.log

@ccztux
Copy link
Contributor

ccztux commented Aug 24, 2020

I cant see any suspicious behavior in the logfile.
Is the ncpa_listener now running with uid = root and gid = root?
I hoped to see something in the ncpa_listener.log with loglevel = debug in case the ncpa_listener service was configured to run with root privileges.
It would also be interesting, if the mountpoint would be shown in the api, in case the ncpa_listener is running with root privileges.

Can you please try these two commands?:

/usr/local/nagios/libexec/check_ncpa.py -H vendprodcdb.marketingassociates.com -t 'mytoken12345' -P 5693 -M 'disk/physical' -l
/usr/local/nagios/libexec/check_ncpa.py -H vendprodcdb.marketingassociates.com -t 'mytoken12345' -P 5693 -M 'disk/mountl' -l

@sowmian
Copy link
Author

sowmian commented Aug 24, 2020

[root@manxi01 ~]# /usr/local/nagios/libexec/check_ncpa.py -H vendprodcdb.marketingassociates.com -t 'mytoken12345' -P 5693 -M 'disk/physical' -l
UNKNOWN: Execution exceeded timeout threshold of 60s
[root@manxi01 ~]#

@sowmian
Copy link
Author

sowmian commented Aug 24, 2020

[root@manxi01 ~]# /usr/local/nagios/libexec/check_ncpa.py -H vendprodcdb.marketingassociates.com -t 'mytoken12345' -P 5693 -M 'disk/mountl' -l
{
"error": {
"node": "mountl",
"path": "/api/disk/mountl/",
"message": "The node requested does not exist. You may be trying to access the 'mount' node.",
"code": 100
}
}
[root@manxi01 ~]#

@ccztux
Copy link
Contributor

ccztux commented Aug 25, 2020

My mistake, there is a typo in the metrics portion of the command. Sorry.
The right command is:

/usr/local/nagios/libexec/check_ncpa.py -H vendprodcdb.marketingassociates.com -t 'mytoken12345' -P 5693 -M 'disk/mount' -l

Could you install the python module psutils on the affected system? I would like to try something.

@sowmian
Copy link
Author

sowmian commented Aug 25, 2020

[root@manxi01 ~]# /usr/local/nagios/libexec/check_ncpa.py -H vendprodcdb.marketingassociates.com -t 'mytoken12345' -P 5693 -M 'disk/mount' -l
{
"mount": {}
}
[root@manxi01 ~]#

I'm checking on PSUTILS for AIX as the Affected system is AIX 7.2, will update you shortly on that.

@sowmian
Copy link
Author

sowmian commented Aug 25, 2020

PSUTILS is installed now.

rpm -qa|grep -i psutils

psutils-1.23-1.ppc

date

Tue Aug 25 14:45:32 EDT 2020

@ccztux
Copy link
Contributor

ccztux commented Aug 25, 2020

Cool, thank you!
Can you create a new python file with the following content, execute it and provide the output?:

#!/usr/bin/env python

import psutil

psutil.disk_partitions(all=True)

@sowmian
Copy link
Author

sowmian commented Aug 25, 2020

We are performing in Prod Environment. Please let me know if this affects any running services on the server

@ccztux
Copy link
Contributor

ccztux commented Aug 26, 2020

It should not have any impact. This is the way ncpa gets some disk information.

@sowmian
Copy link
Author

sowmian commented Aug 26, 2020

./test_disk.sh

python: A file or directory in the path name does not exist.

@ccztux
Copy link
Contributor

ccztux commented Aug 29, 2020

Can you try this command?:

/usr/bin/env python

@sowmian
Copy link
Author

sowmian commented Aug 31, 2020

/usr/bin/env python

python: A file or directory in the path name does not exist.

@sowmian
Copy link
Author

sowmian commented Aug 31, 2020

I checked on the PSUTIL file and I don't see any available package for installation on the AIX 7.1 Server

@sowmian
Copy link
Author

sowmian commented Sep 3, 2020

Any update on this.

@ccztux
Copy link
Contributor

ccztux commented Sep 3, 2020

As mentioned here #670 (comment) psutils will be updated with the next build (2.3.0). Maybe this will fix your issue too.

@ccztux
Copy link
Contributor

ccztux commented Feb 3, 2021

Version 2.3.0 is released. Can you please give it a try?

@jomann09
Copy link
Contributor

jomann09 commented Feb 8, 2021

I'm actually having problems with the AIX builds at the moment, unfortunately I don't think we will be able to build it again on there until Python 3 due to the fact that Python 2 doesn't build well from source on the AIX systems I have access to and cx_Freeze doesn't work properly with python 2.7 in AIX.

@jomann09
Copy link
Contributor

Closing this since we won't be doing a new official AIX build until sometime after NCPA 3 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants