Page 2 of 3

Re: How to monitor fileshare on NAS server

Posted: Mon Mar 22, 2021 5:55 am
by Amit_Alone
@p4ben, could you please share the suggested doc link.

Re: How to monitor fileshare on NAS server

Posted: Mon Mar 22, 2021 3:25 pm
by benjaminsmith
Hi Amit_Alone,

Do you have access to the documentation for this particular NAS? That looks like the next step to troubleshoot this issue.

--Benjamin

Re: How to monitor fileshare on NAS server

Posted: Tue Mar 23, 2021 5:27 am
by Amit_Alone
Hi Benjamin,

Not sure about the access. But if you can share the link then I can have a look either way share the doc over here itself.

However, as you mention it is the next step of troubleshoot. So, could you please assist me with the first steps of troubleshooting.

Thanks,
Amit

Re: How to monitor fileshare on NAS server

Posted: Tue Mar 23, 2021 4:33 pm
by benjaminsmith
Hi,

I'm not certain what device this is. What is device, make and model number?

Do you have access to the web interface ( as posted earlier)? Can you verify that SNMP is enabled or that it supports that functionality, we only saw the setting for SNMP Traps.

--Benjamin

Re: How to monitor fileshare on NAS server

Posted: Wed Mar 24, 2021 9:32 am
by Amit_Alone
Hi Benjamin,

Attaching the device make and model image.

Regarding access of web interface it is limited till storage team I don't have it. Also, they have told SNMP is enabled.

--- Amit

Re: How to monitor fileshare on NAS server

Posted: Wed Mar 24, 2021 5:03 pm
by benjaminsmith
Hi,

Thanks for posting the model. That device only supports traps.

See: No SNMP Support for EMC Unity ??! Really ?

However, this plugin might work with this device. It will use the API.

https://github.com/thecodeteam/nagios-unity

Benjamin

Re: How to monitor fileshare on NAS server

Posted: Fri Mar 26, 2021 7:15 am
by Amit_Alone
Hi,

Thanks for sharing the details. I was able to install the nagios utility. But after running the suggested command I have observed 401 error regarding this I'm checking with the concern team.

Code: Select all

# nagios-unity -H 10.140.167.22 -u admin -p ******** ssc
Traceback (most recent call last):
  File "/bin/nagios-unity", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/nagiosunity/cli/client.py", line 66, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/nagiosunity/cli/client.py", line 86, in main
    return command(cli_opt).check()
  File "/usr/lib/python2.7/site-packages/nagiosunity/commands/ssc.py", line 41, in check
    self.sscs)
  File "/usr/lib/python2.7/site-packages/nagiosunity/lib/utils.py", line 36, in get_all_status
    for obj in unity_objects:
  File "/usr/lib/python2.7/site-packages/storops/lib/resource.py", line 280, in __iter__
    return iter(self.list)
  File "/usr/lib/python2.7/site-packages/storops/lib/resource.py", line 261, in list
    self.update()
  File "/usr/lib/python2.7/site-packages/cachez.py", line 206, in func_wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/storops/unity/resource/__init__.py", line 295, in update
    ret = super(UnityResourceList, self).update(data)
  File "/usr/lib/python2.7/site-packages/cachez.py", line 206, in func_wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/storops/lib/resource.py", line 227, in update
    data = self._get_raw_resource()
  File "/usr/lib/python2.7/site-packages/storops/unity/resource/__init__.py", line 321, in _get_raw_resource
    nested_fields=nested_fields)
  File "/usr/lib/python2.7/site-packages/storops/unity/client.py", line 43, in _wrap
    ret = func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/storops/unity/client.py", line 74, in get_all
    fields = self.get_fields(type_name, base_fields, nested_fields)
  File "/usr/lib/python2.7/site-packages/storops/unity/client.py", line 165, in get_fields
    ret = unity_type.fields
  File "/usr/lib/python2.7/site-packages/storops/unity/resource/type_resource.py", line 54, in fields
    ret = tuple(sorted(att['name'] for att in self.attributes))
  File "/usr/lib/python2.7/site-packages/storops/lib/resource.py", line 172, in __getattr__
    ret = self._get_property_from_raw(item)
  File "/usr/lib/python2.7/site-packages/storops/unity/resource/__init__.py", line 143, in _get_property_from_raw
    value = super(UnityResource, self)._get_property_from_raw(item)
  File "/usr/lib/python2.7/site-packages/storops/lib/resource.py", line 186, in _get_property_from_raw
    self.update()
  File "/usr/lib/python2.7/site-packages/cachez.py", line 206, in func_wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/storops/lib/resource.py", line 61, in update
    data = self._get_raw_resource()
  File "/usr/lib/python2.7/site-packages/storops/unity/resource/type_resource.py", line 39, in _get_raw_resource
    resp = self._cli.rest_get(url, fields=self._fields)
  File "/usr/lib/python2.7/site-packages/storops/unity/client.py", line 131, in rest_get
    return RestResponse(self._rest.get(url))
  File "/usr/lib/python2.7/site-packages/storops/connection/connector.py", line 77, in get
    return self.http_client.get(url, **kwargs)
  File "/usr/lib/python2.7/site-packages/storops/connection/client.py", line 141, in get
    result = self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/storops/connection/client.py", line 127, in _cs_request
    **kwargs)
  File "/usr/lib/python2.7/site-packages/retryz/__init__.py", line 192, in func_wrapper
    ret = function(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/storops/connection/client.py", line 137, in _cs_request_with_retries
    return self.request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/storops/connection/client.py", line 118, in request
    raise exceptions.from_response(resp, method, full_url)
storops.connection.exceptions.HTTPClientError: HTTP Client Error (HTTP 401)
--- Amit

Re: How to monitor fileshare on NAS server

Posted: Fri Mar 26, 2021 10:10 am
by Support_Talea
Hi,

try to modify nagios-unity with correct path python.

My path is : #!/usr/bin/python3

This plugins is very simple to install.

Regards
-Fede

Re: How to monitor fileshare on NAS server

Posted: Fri Mar 26, 2021 5:07 pm
by benjaminsmith
Hi,

Do you have any special characters in your password? Double-check the credentials and then try wrapping it quotes and test again

Can you successfully run a simple command to generate the help menu?

Code: Select all

nagios-unity --help
Regards,
Benjamin

Reference:
HTTP Client Error (HTTP 401) #2

Re: How to monitor fileshare on NAS server

Posted: Fri Apr 16, 2021 11:18 am
by Amit_Alone
Sorry for late reply, person was on leave who can provide correct details.

Also, thanks Benjamin shared nagios-utility is working as expected. I can see all the provided monitoring commands are working as expected.

However, steps that are share for updating the Nagios configuration is getting wipe out after every nagios service restart.

Also, could you please assist me how to monitor the fileshares that are present on NAS server. Such as there Disk size, replication connection and connection with host.

\\IPADDRESS\SOFTWARE$
\\IPADDRESS\INTERFACES$
\\IPADDRESS\LOGS$

-- Amit