Jump to content
TomSeleman

script to exclude USB drives from alerts?

Recommended Posts

I'm looking for a script or syntax to use to create a new monitor alert for the "DRV - Free Space Remaining < 10% Total Size:" I basically have a USB device attached to the server and do not need to be alerted when the space gets below 10%. Labtech tech suggested I 'copy the monitor and then add the additional condition using the driveid and if you need assistance with the syntax to add to the additional condition please visit the LabTech Geek forums for further assistance'

Share this post


Link to post
Share on other sites

The easiest way is:

1- Open the Server who has the USB Drives connected to it, and navigate to Drives tab to get the DriveID from there

 

2- Add into Additional Conditions in the Internal Monitor the following:

AND DriveID <> '6849'

Change (6849) with the number you got from the 1st step as your USB Drive ID .

 

In this way this drive won't be detected by this monitor anymore.

 

P.S.: "Copy the Internal Monitor" is simply by right click then "Copy Monitor", and the concept of that is to not change the default monitor, that can be restored i.e. after update

1.JPG.29ffa7f562ae92698a84639eb7c39b96.JPG

Share this post


Link to post
Share on other sites

If it were me I wouldn't do the DriveID exception as it is a one off solution that would need to be done each time you come across a new USB drive (depends on how you like to approach the issue). The monitor conditions I use day to day and have not seen issues (with our setup at least) are as follows:

 

Drives.Size > 6000 and Drives.FileSystem not in ('ERR','CDFS','UNKFS','UKNFS','DVDFS','FAT','FAT32','NetFS') and Drives.Missing !=1 and Drives.Model not like '%USB%' and Drives.VolumeName not in ('WCDisk')

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Alex, you are right!

Actually, my monitor excludes all USB and SSD as well, but I was answering if specific USB as Tom said connected to to specific server.

Share this post


Link to post
Share on other sites

Yup, you covered that case perfectly, just wanted to get the other method out there in case it was his end goal.

 

ALL THE SOLUTIONS!!

Share this post


Link to post
Share on other sites
On 7/20/2016 at 8:00 PM, Alex.Graf said:

 

Alex,

can you paste the additional condition SQL query here? I have    Eventlogs.Source like 'disk%' and timegen > DATE_SUB(NOW(), INTERVAL 1 DAY)      when I add the one you posted here at the end of it, it doesn't seem to like it. I used AND before your SQL condition for sure.

Rami, I have same issue with DriveID, could you paste the additional condition too? I want to see how you did it?

It would be great to see a screenshot of the monitor's configuration page you have.

Thanks

Jay

Share this post


Link to post
Share on other sites

I've actually been playing with this myself in the last 24 hours or so to prevent noise from disk alerts and have come up with a fairly complicated automatic system which monitors everything without noise! :D It does however mean we have ended up with multiple monitors but for good reason...

 

1. 10% Monitor looking at only Internal Drives, however if the drive is bigger then 100Gb the 10% turns into a 10Gb monitor, this prevents low disk space 100Gb free on 1Tb drivers for example....

((Drives.Size > 100000 and Drives.Free < 10000) OR (Drives.Size < 100000)) and Drives.FileSystem not in ('CDFS','UNKFS','DVDFS','FAT','FAT32','NetFS') and missing=0 and Internal=1

 

2. 20% Monitor targeted only at Image Manager servers & only at drives which have BACKUP in their name!!!

Drives.Size > 16384 and Drives.FileSystem not in ('CDFS','UNKFS','DVDFS','NetFS') and missing=0 and Drives.VolumeName like '%Backup%'

 

So far so good all reporting back really well very happy with this setup, only problem is we will have to make sure backup drives are labelled appropriately but most already are and the rest are easy to fix without breaking anything. :)

 

Thanks

 

Stuart.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...