Jump to content
drode

Custom S.M.A.R.T. monitor

Recommended Posts

Automate's SMART monitor has been giving false positives for certain machines we have with SSD drives. I reached out to Automate support about this but they said we would need to customize the monitor to fix this. They showed us where to go to in the Automate settings to customize the monitor, but as for the specifics of how to actually do it, they said that was out of the scope of their support.

What needs to happen is that I need to add some additional conditions (see the attached screenshot) so that SMART attribute 195 is ignored if the drive is an SSD. I have no idea how to achieve this.

Does anyone here have experience with customizing their Automate SMART monitor that could help me out with this or point me to some resources to get started with figuring this out?

Capture.JPG

Share this post


Link to post
Share on other sites

look at "Additional Condition", see the part that excludes SMART Attribute 190? Copy that string and adjust it for 195...make sure you duplicate this monitor to create a custom one instead of just changing the original...

  • Like 1

Share this post


Link to post
Share on other sites

Wow, I totally spaced that I need this to be specific to SSDs. Yes, attribute 195 is now excluded from the monitor, but how do I make this only exclude SMART attribute 195 if the drive is an SSD?

Share this post


Link to post
Share on other sites

You need to figure out what identifies the drive as an SSD in the database and then include that in the condition. I was only able to give you the information before because you had it on screen, it sounds like you'll need to go database exploring to identify how drives are indicated as SSDs in there, and then turn that exclusion statement into a logical AND statement that includes the check for the SSD. I suppose if you still get stuck I can go jump through the database for you but I highly encourage self exploration because its how I learned :)

 

Share this post


Link to post
Share on other sites
v_smartattributes.Threshold > 0
AND ((Computers.Flags & 2048) <> 2048)
AND (computers.os NOT LIKE 'Mac OS X%'
     AND computers.os NOT LIKE 'Linux%')
AND v_smartattributes.attributeid <> 190
AND v_smartattributes.attributeid <> 195
AND Computers.LastContact > DATE_ADD(NOW(),INTERVAL -15 MINUTE)

I know the table that holds that information. It's the drives table under the ssd section. So it would be something like drives.ssd = 0, but I don't know enough about SQL code to integrate that into the Additional Condition block.

Share this post


Link to post
Share on other sites

So the v_smartattributes isn't a table but a view which is basically a custom sql query created to gather data from multiple tables and saved into a view permanently so you don't have to keep running the same query again and again to pull the informatino you want to see.

This view has the DriveID which identifies the specific drives talked about, in this case you can use something like

AND (v_smartattributes.attributeid <> 195 AND v_smartattributes.driveID IN (Select DriveID from Drives where SSD=1))

So your entire block would be

v_smartattributes.Threshold > 0
AND ((Computers.Flags & 2048) <> 2048)
AND (computers.os NOT LIKE 'Mac OS X%'
     AND computers.os NOT LIKE 'Linux%')
AND v_smartattributes.attributeid <> 190
AND (v_smartattributes.attributeid <> 195 AND v_smartattributes.driveID IN (Select DriveID from Drives where SSD=1))
AND Computers.LastContact > DATE_ADD(NOW(),INTERVAL -15 MINUTE)

or something like that. This is all without testing but gives you an idea of what you can do, and there are definitely "better" ways of doing this as well as I'm definitely not a master of SQL

  • Thanks 1

Share this post


Link to post
Share on other sites

Ah! I made a couple small tweaks, but that is what I needed! As far as I can tell, it is doing what I want it to do. Thank you for the help!

Share this post


Link to post
Share on other sites

@drode Would you be willing to share what you did to make it work?  We've been having issues with SSDs failure SMART Monitors and affecting our Health Reports, so a solution would be greatly appreciated

Share this post


Link to post
Share on other sites

Alas! Here are ALL the resources you could need on this!

For a great, unofficial, collection of the Labtech Database Schema (data dictionary):

https://lt.rmmsecurity.com/LT%20Data%20Dictionary/main.html

Now, in my case, it was a Micron SSD that was triggering a false-postive; and so, with the help of the above dictionary, I was able to create and add the following SQL statement:

... AND v_smartattributes.model not like 'Micron%' ...

at the time of this post, the DRV - Smart Failures (448) monitor's Additional Condition is the following (including my addition)

v_smartattributes.Threshold>0 and  ((((Computers.Flags & 2048) <> 2048)) ) and (computers.os not like 'Mac OS X%' and computers.os not like 'Linux%') and v_smartattributes.attributeid<>190 AND v_smartattributes.model not like 'Micron%' AND Computers.LastContact > DATE_ADD(NOW(),INTERVAL -15 MINUTE)

Works GREAT!  false positive from Micron SSD is now OUT! 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×