NCP Agent not detecting XFS File System

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

NCP Agent not detecting XFS File System

Post by Sampath.Basireddy »

Hello There,

Does NCP Agent v2.3.1 support monitoring of XFS File System?

Before upgrading to the latest version of NCP Agent, Disk usage monitoring of XFS FS was working fine, but post upgrade, the FS is not being detected.

When I check in the NCPA Web Console of the respective server, it does show the XFS FS.

Any inputs please?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: NCP Agent not detecting XFS File System

Post by ssax »

I just labbed this up and it's showing xfs on NCPA v2.3.1 properly.

Does it show here? (select API > Disk > Logical)
- Change X.X.X.X to the IP of the NCPA host, open it in a web browser

Code: Select all

https://X.X.X.X:5693/gui/api
Are you seeing any errors in your ncpa_listener.log on the NCPA host?
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Re: NCP Agent not detecting XFS File System

Post by Sampath.Basireddy »

Yes, I can see all the disks "xfs" when I access the NCPA Console.

Attaching the web console screenshot for reference.
You do not have the required permissions to view the files attached to this post.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: NCP Agent not detecting XFS File System

Post by vtrac »

Great!! .... can we close / lock this thread?

Regards,
Vinh
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Re: NCP Agent not detecting XFS File System

Post by Sampath.Basireddy »

I can see the FS in NCPA Console, but the issue here is, when I create a Disk Usage Service, it fails on me.

Code: Select all

UNKNOWN: The node (/var/lib/ceph/osd/ceph-27) requested does not exist. You may be trying to access the '/' node.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: NCP Agent not detecting XFS File System

Post by vtrac »

Hi,
Please upload the command you used, which produced the error in your last reply.

Also, please run the below command and update ALL outputs to this thread so we can work on the issue:
(NOTE: x.x.x.x is the IP address of the remote NCPA machine. You can get the "token / community_string" in the "/usr/local/ncpa/etc/ncpa.cfg" file on your NCPA remote machine)

Code: Select all

curl -k 'https://x.x.x.x:5693/api/disk/?token=yourToken'
Best Regards,
Vinh
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Re: NCP Agent not detecting XFS File System

Post by Sampath.Basireddy »

Here is the command:

Code: Select all

[root@nagios1 ~]# /usr/local/nagios/libexec/check_ncpa.py -H xx.xx.xx.xxx -t <tokenID> -P 5693 -M 'disk/logical/|var|lib|ceph|osd|ceph-11/used_percent' -c 90 -w 85
UNKNOWN: The node (/var/lib/ceph/osd/ceph-11) requested does not exist. You may be trying to access the '/' node.
I will pm you the output of curl command.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: NCP Agent not detecting XFS File System

Post by vtrac »

Hi,
Could you please also update the output of the below "df" command?
I need that to compare with the curl outputs.

Code: Select all

df -hT
Regards,
Vinh
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Re: NCP Agent not detecting XFS File System

Post by Sampath.Basireddy »

Here is the output of df -hT from one of the issue nodes:

Code: Select all

root@server009:~# df -hT
Filesystem                  Type      Size  Used Avail Use% Mounted on
udev                        devtmpfs  126G     0  126G   0% /dev
tmpfs                       tmpfs      26G   50M   26G   1% /run
/dev/mapper/ceph09--vg-root ext4      218G  4.8G  202G   3% /
tmpfs                       tmpfs     126G   12K  126G   1% /dev/shm
tmpfs                       tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs                       tmpfs     126G     0  126G   0% /sys/fs/cgroup
/dev/sdy2                   ext2      721M  141M  544M  21% /boot
/dev/sdy1                   vfat      511M  3.7M  508M   1% /boot/efi
/dev/sdx1                   xfs       1.1T  577G  541G  52% /var/lib/ceph/osd/ceph-179
/dev/sdn1                   xfs       1.1T  522G  596G  47% /var/lib/ceph/osd/ceph-169
/dev/sdi1                   xfs       1.1T  695G  422G  63% /var/lib/ceph/osd/ceph-164
/dev/sdv1                   xfs       1.1T  499G  619G  45% /var/lib/ceph/osd/ceph-177
/dev/sdm1                   xfs       1.1T  499G  619G  45% /var/lib/ceph/osd/ceph-168
/dev/sdk1                   xfs       1.1T  609G  509G  55% /var/lib/ceph/osd/ceph-166
/dev/sdq1                   xfs       1.1T  693G  425G  62% /var/lib/ceph/osd/ceph-172
/dev/sdt1                   xfs       1.1T  531G  586G  48% /var/lib/ceph/osd/ceph-175
/dev/sdh1                   xfs       1.1T  613G  504G  55% /var/lib/ceph/osd/ceph-163
/dev/sdo1                   xfs       1.1T  560G  558G  51% /var/lib/ceph/osd/ceph-170
/dev/sdg1                   xfs       1.1T  456G  662G  41% /var/lib/ceph/osd/ceph-162
/dev/sdl1                   xfs       1.1T  711G  407G  64% /var/lib/ceph/osd/ceph-167
/dev/sdj1                   xfs       1.1T  510G  607G  46% /var/lib/ceph/osd/ceph-165
/dev/sdu1                   xfs       1.1T  553G  565G  50% /var/lib/ceph/osd/ceph-176
/dev/sdf1                   xfs       1.1T  419G  699G  38% /var/lib/ceph/osd/ceph-161
/dev/sde1                   xfs       1.1T  582G  536G  53% /var/lib/ceph/osd/ceph-160
/dev/sdp1                   xfs       1.1T  525G  593G  47% /var/lib/ceph/osd/ceph-171
/dev/sdr1                   xfs       1.1T  666G  452G  60% /var/lib/ceph/osd/ceph-173
/dev/sdw1                   xfs       1.1T  556G  562G  50% /var/lib/ceph/osd/ceph-178
/dev/sds1                   xfs       1.1T  594G  524G  54% /var/lib/ceph/osd/ceph-174
tmpfs                       tmpfs      26G     0   26G   0% /run/user/1002
root@server009:~#
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: NCP Agent not detecting XFS File System

Post by vtrac »

Hi,
Based on the outputs of "curl", we have the following tree structure (example):

Code: Select all

    "disk": {
        "mount": {
            "|var|lib|ceph|osd|ceph-63": {
                "fstype": 
                "opts":
                "device_name":
            }, 

        "logical": {
            "|boot": {
                "used_percent": 
                "used":
                "inodes_used":
                "free":
                "device_name":
                "inodes_free":
                "inodes":
                "fstype":
                "total": 
                "opts": 
                "inodes_used_percent":
            }, 

        "physical": {
            "sdf3": {
                "read_time":
                "read_bytes":
                "write_count":
                "write_time": 
                "write_bytes":
                "read_count": 
            }, 


Here are some example of "check_ncpa.py".

If I want to find "/boot", I would follow the tree down ....
"disk/logical/|boot/used_percent"
or
"disk/logical/|boot/inodes_used" ..... you get the idea here .... :-)

Code: Select all

disk:
        "logical": {
            "|boot": {
                "used_percent":
                "used":
                "inodes_used":
                "free":
                "device_name":
                "inodes_free":
                "inodes":
                "fstype":
                "total":
                "opts":
                "inodes_used_percent":
            },
Based on the structure of "curl" output, I can contruct the "check_ncpa.py" .... please see example below:


If you want "use_percent' of "/boot" filesystem, your command must be like this:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H xx.xx.xx.xxx -t <tokenID> -P 5693 -M 'disk/logical/|boot/used_percent'
"free" on "/boot":

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H xx.xx.xx.xxx -t <tokenID> -P 5693 -M 'disk/logical/|boot/free'
"free" on "/" filesystsem:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H xx.xx.xx.xxx -t <tokenID> -P 5693 -M 'disk/logical/|/free'
"read_bytes" of "sdf3":

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H xx.xx.xx.xxx -t <tokenID> -P 5693 -M 'disk/physical/sdf3/read_bytes'
List "device_name" of "|var|lib|ceph|osd|ceph-63":

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H xx.xx.xx.xxx -t <tokenID> -P 5693 -M 'disk/mount/|var|lib|ceph|osd|ceph-63/device_name'
List "fstype" of "|var|lib|ceph|osd|ceph-63":

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H xx.xx.xx.xxx -t <tokenID> -P 5693 -M 'disk/mount/|var|lib|ceph|osd|ceph-63/fstype'
As you can see, the "curl" output is very useful. You used that to setup your "check_ncpa.py" call with the "-M" option.


Best Regards,
Vinh
Locked