Page 1 of 1

NCPA Wizard: Can't Monitor Disk Metrics

Posted: Mon Feb 10, 2014 11:08 pm
by juana
Hello,

I installed the NCPA client (ncpa-head.el6.x86_64.rpm) on my RHEL6 box. In a nutshell:

Code: Select all

cd /tmp/
wget http://assets.nagios.com/downloads/ncpa/ncpa-head.el6.x86_64.rpm
rpm -ivh --nomd5 --nodeps ncpa-head.el6.x86_64.rpm 
vi  /usr/local/ncpa/etc/ncpa.cfg 
/etc/init.d/ncpa_listener restart
In Nagios XI, I have the NCPA Agent Monitoring Wizard installed. When I run the wizard, Disk Metrics cannot be configured. I tried reinstalling the NCPA Agent (System Extensions -> Manage Config Wizards and reuploaded ncpa.zip), but no changes.

How can I monitor Disk Metrics via NCPA?

Thank you in advance,

Juana

Re: NCPA Wizard: Can't Monitor Disk Metrics

Posted: Tue Feb 11, 2014 10:58 am
by slansing
Hmm, this might be an issue with what the agent is reporting back to the wizard when you contact it via the address/token you provided in step 2. Have you been able to successfully monitor these metrics with other remote hosts using the NCPA agent? Or is this the first one you tried.

Re: NCPA Wizard: Can't Monitor Disk Metrics

Posted: Tue Feb 11, 2014 1:22 pm
by juana
This is the first Linux I've tried. I know that Disk Metrics are being reported back via NCPA client but for Windows server.

Re: NCPA Wizard: Can't Monitor Disk Metrics

Posted: Tue Feb 11, 2014 3:53 pm
by lmiltchev
Can you see the disk live states, from the GUI?

[url]https://<agent's%20IP>:5693/api/?token=<token>[/url]

Can you run the following command on the Nagios server and show us the output?

Code: Select all

curl -vvv --insecure "https://<agent's IP>:5693/api/disk?token=<token>"

Re: NCPA Wizard: Can't Monitor Disk Metrics

Posted: Wed Feb 12, 2014 7:05 pm
by juana
Here's the https://<agent's%20IP>:5693/api/?token=<token> output:

Code: Select all

* About to connect() to xxxxx port 5693 (#0)
*   Trying xxxxxxx... connected
* Connected to xxxxxxx (xxxxxx) port 5693 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* warning: ignoring value of ssl.verifyhost
* skipping SSL peer certificate verification
* SSL connection using TLS_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
* 	subject: O=Dummy Certificate,CN=*
* 	start date: Feb 05 01:48:44 2014 GMT
* 	expire date: Feb 05 01:48:44 2015 GMT
* 	common name: *
* 	issuer: O=Self-Signed,CN=Untrusted Authority
> GET /api/disk?token=xxxxxxxxxxxxxxxxx HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: xxxxxxxxxxu:5693
> Accept: */*
> 
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Content-Type: application/json
< Content-Length: 2831
< Server: Werkzeug/0.9.4 Python/2.6.6
< Date: Wed, 12 Feb 2014 23:59:20 GMT
< 
{
  "value": {
    "disk": {
      "logical": {
        "|": {
          "device_name": "/dev/mapper/vg_parallel-LogVol01", 
          "free": [
            105576898560, 
            "b"
          ], 
          "total_size": [
            115329425408, 
            "b"
          ], 
          "used": [
            3894132736, 
            "b"
          ], 
          "used_percent": [
            3.3999999999999999, 
            "%"
          ]
        }, 
        "|boot": {
          "device_name": "/dev/sda1", 
          "free": [
            882720768, 
            "b"
          ], 
          "total_size": [
            1056858112, 
            "b"
          ], 
          "used": [
            120451072, 
            "b"
          ], 
          "used_percent": [
            11.4, 
            "%"
          ]
        }
      }, 
      "phyical": {
        "dm-0": {
          "read_bytes": [
            935756800, 
            "b"
          ], 
          "read_count": [
            27928, 
            "c"
          ], 
          "read_time": [
            40034, 
            "ms"
          ], 
          "write_bytes": [
            4589629440, 
            "b"
          ], 
          "write_count": [
            1120754, 
            "c"
          ], 
          "write_time": [
            798844, 
            "ms"
          ]
        }, 
        "dm-1": {
          "read_bytes": [
            1564672, 
            "b"
          ], 
          "read_count": [
            382, 
            "c"
          ], 
          "read_time": [
            386, 
            "ms"
          ], 
          "write_bytes": [
            0, 
            "b"
          ], 
          "write_count": [
            0, 
            "c"
          ], 
          "write_time": [
            0, 
            "ms"
          ]
        }, 
        "sda1": {
          "read_bytes": [
            6620160, 
            "b"
          ], 
          "read_count": [
            628, 
            "c"
          ], 
          "read_time": [
            129, 
            "ms"
          ], 
          "write_bytes": [
            5263360, 
            "b"
          ], 
          "write_count": [
            36, 
            "c"
          ], 
          "write_time": [
            156, 
            "ms"
          ]
        }, 
        "sda2": {
          "read_bytes": [
            937837568, 
            "b"
          ], 
          "read_count": [
            24463, 
            "c"
          ], 
          "read_time": [
            26792, 
            "ms"
          ], 
          "write_bytes": [
            4589629440, 
            "b"
          ], 
          "write_count": [
            419290, 
            "c"
          ], 
          "write_time": [
            229519, 
            "ms"
          ]
        }
      }
    }
  }
* Closing connection #0

Re: NCPA Wizard: Can't Monitor Disk Metrics

Posted: Thu Feb 13, 2014 11:26 am
by lmiltchev
Go to the CCM->Services-><your disk check service>->Modify

and place in the $ARG1$ field something like this:

for /

Code: Select all

-t '<token>' -P 5693 -M 'disk/logical/|/used_percent' -w 80 -c 90
for /boot

Code: Select all

-t '<token>' -P 5693 -M 'disk/logical/|boot/used_percent' -w 80 -c 90
...etc.

See if this is going to work.