LabTech Support Forums

Internal Monitor Drive Errors

This forum is for discussion of monitor related issues.

Moderator: jware.connectwise

Internal Monitor Drive Errors

Postby jason.rodda.hoodsweeney » Wed Jun 01, 2016 8:06 pm

Howdy,

Was hoping I could get some assistance with an internal monitor of mine.

I am looking to exclude event logs which are about %\Device\Harddisk2\DR263% - these are causing false positives on the monitor and would like them ignored.

Is there any documentation around this sort of coding? My knowledge is fairly limited and have been copying stuff from other monitors.

Code: Select all
eventlogs.timegen > DATE_SUB(CURRENT_DATE(), INTERVAL 1 Hour)
and eventlogs.eventtype in (0,1,3)
and ( eventlogs.message like "%disk%" 
or eventlogs.message like "%raid%" 
or eventlogs.message like "%array%" 
or eventlogs.message like "%degraded state%" 
or eventlogs.message like "% Predictive failure%"
or eventlogs.message like "% drive failure%")
and (eventlogs.source not like "%Symantec%" 
and eventlogs.source not like "%Microsoft-Windows-User Profiles Service%" 
and eventlogs.source not like"%Microsoft-Windows-FilterManager%"
and eventlogs.source not like "MSSQL$SBSMONITORING%"
and eventlogs.message not like "%\Device\Harddisk2\DR263%"
and eventlogs.message not like "%\Device\Harddisk1\DR167%" 
and eventlogs.message not like"%during a paging operation%" )
jason.rodda.hoodsweeney
Newbie
Newbie
 
Posts: 9
Joined: Sun Aug 31, 2014 9:03 pm

Re: Internal Monitor Drive Errors

Postby teamits » Fri Jun 03, 2016 2:59 pm

It looks right at first glance, but you have to escape the backslash:

and eventlogs.message not like "%\\Device\\Harddisk2\\DR263%"


http://dev.mysql.com/doc/refman/5.7/en/ ... erals.html
Steve
teamits
Hero Member
Hero Member
 
Posts: 1577
Joined: Wed Dec 31, 1969 8:00 pm

Re: Internal Monitor Drive Errors

Postby jason.rodda.hoodsweeney » Mon Jun 06, 2016 4:22 am

Ahh, awesome. Thank you for that.

Just another question. Is there a way to easily find a list of variables I can use within the monitors?

Like, I've got a low disk space monitor. However I'm wanting to include some exclusions if the computer name matches ABC, and the drive letter is X.

Obviously the below won't work. But is there a way I can find the correct variable for which I need to use? I'm looking at this Dataviews section but can't make much sense of it.

Code: Select all
AND (drives.letter not like 'E' AND %computername% not like 'A')
jason.rodda.hoodsweeney
Newbie
Newbie
 
Posts: 9
Joined: Sun Aug 31, 2014 9:03 pm

Re: Internal Monitor Drive Errors

Postby teamits » Mon Jun 06, 2016 10:38 am

The monitors are raw SQL code so no LabTech variables. You would have to look at the database or other monitors' configuration tab to figure out the database fields.

For computer ID it is Computers.ComputerID (table=computers, field=computerid).
Steve
teamits
Hero Member
Hero Member
 
Posts: 1577
Joined: Wed Dec 31, 1969 8:00 pm


Return to Monitors

Who is online

Users browsing this forum: No registered users and 6 guests