LogAnalytics Queries For/ Disk Failures, inode errors...

%3CLINGO-SUB%20id%3D%22lingo-sub-673737%22%20slang%3D%22en-US%22%3ELogAnalytics%20Queries%20For%2F%20Disk%20Failures%2C%20inode%20errors...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-673737%22%20slang%3D%22en-US%22%3E%3CDIV%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EHello%20There!%20I%20am%20working%20with%20a%20customer%20who%20is%20exploring%20LogAnalytics%20queries%20to%20query%20the%20following%20for%20his%20Linux%20VMs%3C%2FFONT%3E%3C%2FDIV%3E%0A%3CUL%3E%0A%3CLI%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EDetect%20inode%20errors%20or%20file%20sync%20errors%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EDetect%20any%20types%20of%20disk%20errors%20%3A%20In%20the%20recent%20times%20my%20customer%20has%20seen%20disk%20entries%20being%20missed%20out%20in%20fstab%20(File%20System%20Table)%20and%20it%20has%20been%20resulting%20into%20disk%20not%20being%20detected%20when%20the%20VM%20reboots%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EUsers%20logged%20in%20at%20any%20time%20and%20also%20the%20processes%20run%20by%20each%20user%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CDIV%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EI%20have%20referred%20to%20this%20document%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Flog-query%2Fadvanced-query-writing%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Flog-query%2Fadvanced-query-writing%3C%2FA%3E%20but%20could%20not%20find%20any%20%3C%2FFONT%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3ECan%20you%20please%20share%20any%20pointers%20for%20the%20above%3F%3C%2FFONT%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EThanks%2C%3CBR%20%2F%3E--Mayur%3C%2FFONT%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-673737%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-677985%22%20slang%3D%22en-US%22%3ERe%3A%20LogAnalytics%20Queries%20For%2F%20Disk%20Failures%2C%20inode%20errors...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-677985%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F355776%22%20target%3D%22_blank%22%3E%40mayurpuli%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDo%20you%20know%20what%20%3CSTRONG%3EFacility%3C%2FSTRONG%3E%20these%20would%20show%20up%20in%3F%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fplatform%2Fdata-sources-syslog%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fplatform%2Fdata-sources-syslog%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EYou%20probably%20have%20to%20collect%20the%20right%20facility%20first%20to%20get%20the%20data%2C%20so%20that%20we%20can%20query%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-677997%22%20slang%3D%22en-US%22%3ERe%3A%20LogAnalytics%20Queries%20For%2F%20Disk%20Failures%2C%20inode%20errors...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-677997%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239477%22%20target%3D%22_blank%22%3E%40Clive%20Watson%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20your%20response.%20Thanks%20for%20the%20share!%20I%20donot%20have%20any%20idea%20about%20this.%20But%20it%20looks%20to%20me%20that%20user%20related%20information%20can%20be%20queried%20from%20the%20Facility%20'user'%2C%20I%20am%20honestly%20not%20sure%20which%20Facility%20can%20help%20in%20collecting%20the%20information%20about%20disk%20errors%20and%20file%20sync%20errors.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAppreciate%20your%20response!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThank%20you%2C%3C%2FP%3E%0A%3CP%3E--Mayur%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-678091%22%20slang%3D%22en-US%22%3ERe%3A%20LogAnalytics%20Queries%20For%2F%20Disk%20Failures%2C%20inode%20errors...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-678091%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F355776%22%20target%3D%22_blank%22%3E%40mayurpuli%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESorry%20I%20cant%20help%20more%2C%20hopefully%20someone%20with%20more%20Linux%20knowledge%20can%20point%20us%20to%20the%20right%20area.%26nbsp%3B%20Has%20you%20customer%20said%20which%20facility%20or%20custom%20log%20they%20are%20looking%20at%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20we%20have%20the%20data%20in%20a%20table%2C%20I%20can%20help%20again%20with%20the%20query%20side.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20public%20demo%20workspace%20has%20Syslog%20data%20(but%20any%20disk%20errors%20may%20have%20passed%20the%20retention%20period%20anyway).%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%0A%3CPRE%3ESyslog%0A%7C%20summarize%20count()%20by%20Facility%3C%2FPRE%3E%0A%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fportal.loganalytics.io%2FDemo%3Fq%3DH4sIAAAAAAAAAwuuLM7JT%252BflqlEoz0gtSlUITi1LLcosqfQB0jkKtrYKSqlFRUog%252BeLS3NzEosyqVIXk%252FNK8Eg1NhaRKBbfE5MwcoHIFHQXn%252FNyC0pLUIh1UM4BcsBW%252BqcXFiempAAE6dwpwAAAA%26amp%3Btimespan%3DP1D%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EGo%20to%20Log%20Analytics%20and%20Run%20Query%3C%2FA%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EIf%20your%20customer%20has%20the%20data%2C%20they%20they%20could%20produce%20a%20sample%20using%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fkusto%2Fquery%2Fdatatableoperator%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Edatatable%3C%2FA%3E%20KQL%20operator.%26nbsp%3B%20Like%20this%2C%20but%20with%20some%20extra%20columns%20added.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%0A%3CPRE%3Elet%20dummyData%20%3D%20datatable(Date%3Adatetime%2C%20dummyTxt%3Astring)%0A%5B%0A%20%20%20%20datetime(now)%20%2C%20%22This%20is%20yet%20another%20test%22%20%2C%0A%20%20%20%20datetime(now)%20%2C%20%22This%20is%20yet%20another%20test%20string%22%20%0A%5D%3B%0AdummyData%0A%7C%20where%20dummyTxt%20%3D%3D%20%22This%20is%20yet%20another%20test%20string%22%20%3C%2FPRE%3E%0A%3CSPAN%3Ewhich%20looks%20like%20this%3A%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CPRE%3E%20%0ADate%20%5BUTC%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20%20dummyTxt%20%20%20%0A2019-06-07T17%3A53%3A14.733%20%20%20%20%7C%20%20This%20is%20yet%20another%20test%20string%20%3C%2FPRE%3E%0A%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Microsoft
Hello There! I am working with a customer who is exploring LogAnalytics queries to query the following for his Linux VMs
  • Detect inode errors or file sync errors
  • Detect any types of disk errors : In the recent times my customer has seen disk entries being missed out in fstab (File System Table) and it has been resulting into disk not being detected when the VM reboots
  • Users logged in at any time and also the processes run by each user
I have referred to this document: https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/advanced-query-writing but could not find any
Can you please share any pointers for the above?
Thanks,
--Mayur
3 Replies
Highlighted

@mayurpuli 

 

Do you know what Facility these would show up in? https://docs.microsoft.com/en-us/azure/azure-monitor/platform/data-sources-syslog

You probably have to collect the right facility first to get the data, so that we can query it.

Highlighted

@Clive Watson 

 

Thank you for your response. Thanks for the share! I donot have any idea about this. But it looks to me that user related information can be queried from the Facility 'user', I am honestly not sure which Facility can help in collecting the information about disk errors and file sync errors. 

 

Appreciate your response!

 

Thank you,

--Mayur

Highlighted

@mayurpuli 

 

Sorry I cant help more, hopefully someone with more Linux knowledge can point us to the right area.  Has you customer said which facility or custom log they are looking at?  

 

When we have the data in a table, I can help again with the query side.

 

The public demo workspace has Syslog data (but any disk errors may have passed the retention period anyway).  

 

Syslog
| summarize count() by Facility
 
If your customer has the data, they they could produce a sample using the datatable KQL operator.  Like this, but with some extra columns added.
 
let dummyData = datatable(Date:datetime, dummyTxt:string)
[
    datetime(now) , "This is yet another test" ,
    datetime(now) , "This is yet another test string" 
];
dummyData
| where dummyTxt == "This is yet another test string" 
which looks like this:
	
Date [UTC]                 |  dummyTxt   
2019-06-07T17:53:14.733    |  This is yet another test string	

Thanks