check_disk_smb with Host Attributes Errors

4 replies [Last post]
spatel's picture
spatel
User offline. Last seen 33 weeks 6 days ago. Offline
Opsview Sensei - 5th DanOpsview Sensei - 4th DanOpsview Sensei - 3rd DanOpsview Sensei - 2nd DanOpsview Sensei - 1st Dan
Joined: 16 Feb 2010
Posts:
Points: 1032

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

0
Your rating: None
spatel's picture
spatel
User offline. Last seen 33 weeks 6 days ago. Offline
Opsview Sensei - 5th DanOpsview Sensei - 4th DanOpsview Sensei - 3rd DanOpsview Sensei - 2nd DanOpsview Sensei - 1st Dan
Joined: 16 Feb 2010
Posts:
Points: 1032

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

Your rating: None
tonvoon's picture
tonvoon
User offline. Last seen 5 days 7 hours ago. Offline
Opsview Sensei - 1st Dan
Joined: 26 May 2010
Posts:
Points: 65

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?

Your rating: None
spatel's picture
spatel
User offline. Last seen 33 weeks 6 days ago. Offline
Opsview Sensei - 5th DanOpsview Sensei - 4th DanOpsview Sensei - 3rd DanOpsview Sensei - 2nd DanOpsview Sensei - 1st Dan
Joined: 16 Feb 2010
Posts:
Points: 1032

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

Your rating: None
tonvoon's picture
tonvoon
User offline. Last seen 5 days 7 hours ago. Offline
Opsview Sensei - 1st Dan
Joined: 26 May 2010
Posts:
Points: 65

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.

Your rating: None