Hello Nagios Crew,
I have a problem monitoring mounted filesystems on windows servers with ncpa agent.
Basicly I have some volumes (ie I:\ H:\ etc) on windows servers that have different volumes mounted under them.
I was unable to find any info on how to monitor utilization of these volumes.
Any suggestions?
Thanks
Sandro
Windows with Mounted Filesystems
Re: Windows with Mounted Filesystems
What is the version of the NCPA agent that you are currently using?
Do you see a line that starts with:
in the ncpa.cfg file?
Do you see any mounts when you access the API in the GUI?
Do you see a line that starts with:
Code: Select all
exclude_fs_types =Do you see any mounts when you access the API in the GUI?
Code: Select all
https://<ip address>:5693/api/disk/mountBe sure to check out our Knowledgebase for helpful articles and solutions!
-
nagiosEngie
- Posts: 104
- Joined: Thu May 03, 2018 7:57 am
Re: Windows with Mounted Filesystems
Hello lmiltchev,
the agent we are using is NCPA 2.1.3.
This is how the ncpa.cfg parameter is set:
#
exclude_fs_types = aufs,autofs,binfmt_misc,cifs,cgroup,configfs,debugfs,devpts,devtmpfs,encryptfs,efivarfs,fuse,hugetlbfs,mqueue,nfs,overlayfs,proc,pstore,rpc_pipefs,securityfs,selinuxfs,smb,sysfs,tmpfs,tracefs
API GUI OUTPUT (https://<ip address>:5693/api/disk/mount):
{
"mount": {
"X:|": {
"fstype": "",
"opts": "cdrom",
"device_name": [
"X:\\"
]
},
"A:|": {
"fstype": "",
"opts": "removable",
"device_name": [
"A:\\"
]
}
}
}
Thanks
Sandro
the agent we are using is NCPA 2.1.3.
This is how the ncpa.cfg parameter is set:
#
exclude_fs_types = aufs,autofs,binfmt_misc,cifs,cgroup,configfs,debugfs,devpts,devtmpfs,encryptfs,efivarfs,fuse,hugetlbfs,mqueue,nfs,overlayfs,proc,pstore,rpc_pipefs,securityfs,selinuxfs,smb,sysfs,tmpfs,tracefs
API GUI OUTPUT (https://<ip address>:5693/api/disk/mount):
{
"mount": {
"X:|": {
"fstype": "",
"opts": "cdrom",
"device_name": [
"X:\\"
]
},
"A:|": {
"fstype": "",
"opts": "removable",
"device_name": [
"A:\\"
]
}
}
}
Thanks
Sandro
Re: Windows with Mounted Filesystems
Mounts in Windows are "per user/per session", so they are not going to be visible to NCPA. Even if you configured the NCPA services to run as a specific user, and changed the uid and gid to this user (in the ncpa.cfg file), probably you would still not be able to view the mounts. Even if you did (while the user is logged in), you wouldn't be able to monitor the mounts if the user is logged out.
Note: I haven't tried running NCPA as a non-system user, and I don't know if this is going to create some other issues with using the agent. Maybe if you had a powershell script that provided you with the required into, you could call it via NCPA (or use some script that queries the Windows registry).
NCPA is not the only agent, that is having issues with monitoring mounts on Windows. Here's a quote te from the NSClient++ documentation:
Note: I haven't tried running NCPA as a non-system user, and I don't know if this is going to create some other issues with using the agent. Maybe if you had a powershell script that provided you with the required into, you could call it via NCPA (or use some script that queries the Windows registry).
NCPA is not the only agent, that is having issues with monitoring mounts on Windows. Here's a quote te from the NSClient++ documentation:
Please note that UNC and network paths are only available in each session meaning a user mounted share will not be visible to NSClient++ (since services run in their own session). But as long as NSClient++ can access the share you can still check it as you specify the UNC path.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
nagiosEngie
- Posts: 104
- Joined: Thu May 03, 2018 7:57 am
Re: Windows with Mounted Filesystems
Hi lmiltchev,
so from what I see there is no solution for this?
Sandro
so from what I see there is no solution for this?
Sandro
Re: Windows with Mounted Filesystems
There is no "out of the box" solution. Again, you could probably use a custom PS script/registry query, and call it via NCPA, but this is not something we could provide. We can keep the topic open for a while in case there are users, who have a solution for monitoring shared drives in Windows, that they would like to share.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
nagiosEngie
- Posts: 104
- Joined: Thu May 03, 2018 7:57 am
Re: Windows with Mounted Filesystems
So I worked on this and found a way to do it.
NCPA agent has the capability to launch commands from the host it is installed on. You place the script in the agent's plugin directory (C:\Programfiles (x86)\nagios\ncpa\plugins).
Next Create a check like this:
/usr/local/nagios/libexec/check_ncpa.py -H <HOSTNAME> -T 120 -t '<PASS>' -P 5693 -M 'plugins/check_storage_pool.ps1'
check_storage_pool.ps1 is the name of your script you copied to the plugin directory. They must be the same.
Attached you can find the script (rename to check_storage_pool.ps1).
Ciao
Sandro
NCPA agent has the capability to launch commands from the host it is installed on. You place the script in the agent's plugin directory (C:\Programfiles (x86)\nagios\ncpa\plugins).
Next Create a check like this:
/usr/local/nagios/libexec/check_ncpa.py -H <HOSTNAME> -T 120 -t '<PASS>' -P 5693 -M 'plugins/check_storage_pool.ps1'
check_storage_pool.ps1 is the name of your script you copied to the plugin directory. They must be the same.
Attached you can find the script (rename to check_storage_pool.ps1).
Ciao
Sandro
You do not have the required permissions to view the files attached to this post.
Re: Windows with Mounted Filesystems
Thanks for sharing, Sandro! I am closing this topic.
Be sure to check out our Knowledgebase for helpful articles and solutions!