check_disk_smb with Host Attributes Errors
Hello,
I have a central file server that I would like to use OpsView with for checking the file shares and so I am trying to set up the "check_disk_smb" to work with the Host Attributes feature (OpsView 3.7.1) so that I can give the file server a newly created "SHARE" attribute and assign multiple SHARE attributes (one for each file share on the server).
Then I configure a new service check with check_disk_smb and on the "Advanced" tab, I select the "Create Multiple Services" and select the SHARE attribute, this should mean that for each SHARE attribute I have for the host, there is a separate check_disk_smb service check for that share.
Unfortunately, I am getting access denied errors when I configure the service checks this way and I can point the finger to when I try and take advantage of the host attributes, my command string for the service check is:
check_disk_smb
-H $HOSTADDRESS$ -s %NAME:1% -W spiralsoft -u opsviewmonitoring -p PW -w 90% -c 95%
This gives an access denies error, however when I explicitly set the share name in the command string ie:
-H $HOSTADDRESS$ -s images -W spiralsoft -u opsviewmonitoring -p PW -w 90% -c 95%
This does not give an access denied error.
For the SHARE attribute the label is SHARE and I have set the value and arg1 to "images" (so the two commands should be identical).
I'm not sure what I am doing wrong and would appreciate it if anyone had any ideas.
Thanks
Sunil
Funnily enough, I just did that today myself for a demo. What would help with this? Or is it just a mistake that needs to be learnt?
Hello Ton,
It might just be a mistake that needs to be learned. The "macros help" does have an example of how to use this, but maybe the online help (that links to the online OpsView documentation) might want to be fleshed out..?
I was probably just in "blinkered" mode and couldn't see what would have been obvious for many people I'm sure.
Sunil
I've had a quick look at the docs at http://docs.opsview.com/doku.php?id=opsview-community:servicecheck#argum... and I think the NRPE_PORT example covers it. Let me know if you have a better suggestion.



Aaw dammit - my fault - I was having a brain fart, the error was in the %NAME:1% - that NAME should be the name of the attribute i.e. SHARE in this example. I'm too embarassed to say how long I've spent trying to figure out this one.
-H $HOSTADDRESS$ -s %SHARE:1% -W spiralsoft -u opsviewmonitoring -p PW -w 90% -c 95%
Sunil