I really don´t understand it.
This simple statement without "sql joins" is working.
[DEBUG] 2020-09-07 12:12:00.979 [Ruby-0-Thread-23: :1] jdbc - (0.001491s) SELECT TOP (1) count(*) AS [COUNT] FROM (SELECT TOP 5 dbo.tblAssets.AssetName FROM dbo.tblAssets) AS [T1]
[DEBUG] 2020-09-07 12:12:00.990 [Ruby-0-Thread-23: :1] jdbc - (0.000792s) SELECT TOP (1) count(*) AS [COUNT] FROM (SELECT TOP 5 dbo.tblAssets.AssetName FROM dbo.tblAssets) AS [T1]
[DEBUG] 2020-09-07 12:12:00.991 [Ruby-0-Thread-23: :1] jdbc - Executing JDBC query {:statement=>"SELECT TOP 5 dbo.tblAssets.AssetName FROM dbo.tblAssets", :parameters=>{:sql_last_value=>2020-09-07 10:09:00 UTC}, :count=>5}
[DEBUG] 2020-09-07 12:12:00.997 [Ruby-0-Thread-23: :1] jdbc - (0.000699s) SELECT TOP 5 dbo.tblAssets.AssetName FROM dbo.tblAssets
[DEBUG] 2020-09-07 12:12:01.277 [[main]>worker1] file - File, writing event to file. {:filename=>"/tmp/jdbc-query.debug"}
[DEBUG] 2020-09-07 12:12:01.277 [[main]>worker0] file - File, writing event to file. {:filename=>"/tmp/jdbc-query.debug"}
[DEBUG] 2020-09-07 12:12:01.278 [[main]>worker0] file - File, writing event to file. {:filename=>"/tmp/jdbc-query.debug"}
[DEBUG] 2020-09-07 12:12:01.280 [[main]>worker3] file - File, writing event to file. {:filename=>"/tmp/jdbc-query.debug"}
[DEBUG] 2020-09-07 12:12:01.283 [[main]>worker2] file - File, writing event to file. {:filename=>"/tmp/jdbc-query.debug"}
[INFO ] 2020-09-07 12:12:01.285 [[main]>worker0] file - Opening file {:path=>"/tmp/jdbc-query.debug"}
[DEBUG] 2020-09-07 12:12:01.852 [Ruby-0-Thread-7: :1] file - Starting flush cycle
[DEBUG] 2020-09-07 12:12:01.852 [Ruby-0-Thread-7: :1] file - Flushing file {:path=>"/tmp/jdbc-query.debug", :fd=>#<IOWriter:0x16d2bc4 @active=true, @io=#<File:/tmp/jdbc-query.debug>>}
And this one with joins don´t work. But I don´t get any error message.
[DEBUG] 2020-09-07 12:09:00.819 [Ruby-0-Thread-23: :1] jdbc - (0.001437s) SELECT TOP (1) count(*) AS [COUNT] FROM (SELECT TOP 1 dbo.tblAssets.AssetID, dbo.tblAssets.AssetName, dbo.tsysAssetTypes.AssetTypename As Type, dbo.tblAssets.IPAddress, dbo.tblAssetCustom.Manufacturer, dbo.tblAssetCustom.Model, dbo.tblAssets.Domain, Case dbo.tsysAssetTypes.AssetTypename When 'Windows' Then dbo.tsysOS.OSname When 'Linux' Then dbo.tblLinuxSystem.OSRelease When 'Apple Mac' Then dbo.tblMacOSInfo.KernelVersion Else '' End As OS, dbo.tblAssets.Mac As MAC_Address, dbo.tblADComputers.OU, dbo.tblState.Statename, dbo.tblAssets.Description, dbo.tblAssetCustom.PurchaseDate, dbo.tblAssetCustom.Warrantydate, dbo.tblAssets.FQDN, dbo.tblAssetCustom.DNSName, dbo.tblAssetCustom.LastPatched, dbo.tblAssetCustom.LastFullbackup, dbo.tblAssetCustom.LastFullimage, dbo.tblAssetCustom.Location, dbo.tblAssetCustom.Building, dbo.tblAssetCustom.Department, dbo.tblAssetCustom.Branchoffice, dbo.tblAssetCustom.BarCode, dbo.tblAssetCustom.Contact, dbo.tblAssetCustom.Serialnumber, dbo.tblAssetCustom.OrderNumber, dbo.tblAssets.Firstseen, dbo.tblAssets.Lastseen, dbo.tblAssets.Lasttried From dbo.tblAssets Left Join dbo.tblAssetRelations On dbo.tblAssetRelations.ChildAssetID = dbo.tblAssets.AssetID Left Join dbo.tsysAssetRelationTypes On dbo.tsysAssetRelationTypes.RelationTypeID = dbo.tblAssetRelations.Type Inner Join dbo.tblAssetCustom On dbo.tblAssets.AssetID = dbo.tblAssetCustom.AssetID Inner Join dbo.tsysAssetTypes On dbo.tsysAssetTypes.AssetType = dbo.tblAssets.Assettype Left Join dbo.tblOperatingsystem On dbo.tblAssets.AssetID = dbo.tblOperatingsystem.AssetID Left Join dbo.tblADComputers On dbo.tblAssets.AssetID = dbo.tblADComputers.AssetID Inner Join dbo.tblState On dbo.tblState.State = dbo.tblAssetCustom.State Left Join dbo.tblLinuxSystem On dbo.tblAssets.AssetID = dbo.tblLinuxSystem.AssetID Left Join dbo.tsysOS On dbo.tblAssets.OScode = dbo.tsysOS.OScode Left Join dbo.tblMacOSInfo On dbo.tblAssets.AssetID = dbo.tblMacOSInfo.AssetID Order By dbo.tblAssets.AssetName) AS [T1]
[DEBUG] 2020-09-07 12:09:00.868 [pool-3-thread-1] jvm - collector name {:name=>"ParNew"}
[DEBUG] 2020-09-07 12:09:00.868 [pool-3-thread-1] jvm - collector name {:name=>"ConcurrentMarkSweep"}
[DEBUG] 2020-09-07 12:09:00.869 [Ruby-0-Thread-23: :1] jdbc - (0.003633s) SELECT TOP (1) count(*) AS [COUNT] FROM (SELECT TOP 1 dbo.tblAssets.AssetID, dbo.tblAssets.AssetName, dbo.tsysAssetTypes.AssetTypename As Type, dbo.tblAssets.IPAddress, dbo.tblAssetCustom.Manufacturer, dbo.tblAssetCustom.Model, dbo.tblAssets.Domain, Case dbo.tsysAssetTypes.AssetTypename When 'Windows' Then dbo.tsysOS.OSname When 'Linux' Then dbo.tblLinuxSystem.OSRelease When 'Apple Mac' Then dbo.tblMacOSInfo.KernelVersion Else '' End As OS, dbo.tblAssets.Mac As MAC_Address, dbo.tblADComputers.OU, dbo.tblState.Statename, dbo.tblAssets.Description, dbo.tblAssetCustom.PurchaseDate, dbo.tblAssetCustom.Warrantydate, dbo.tblAssets.FQDN, dbo.tblAssetCustom.DNSName, dbo.tblAssetCustom.LastPatched, dbo.tblAssetCustom.LastFullbackup, dbo.tblAssetCustom.LastFullimage, dbo.tblAssetCustom.Location, dbo.tblAssetCustom.Building, dbo.tblAssetCustom.Department, dbo.tblAssetCustom.Branchoffice, dbo.tblAssetCustom.BarCode, dbo.tblAssetCustom.Contact, dbo.tblAssetCustom.Serialnumber, dbo.tblAssetCustom.OrderNumber, dbo.tblAssets.Firstseen, dbo.tblAssets.Lastseen, dbo.tblAssets.Lasttried From dbo.tblAssets Left Join dbo.tblAssetRelations On dbo.tblAssetRelations.ChildAssetID = dbo.tblAssets.AssetID Left Join dbo.tsysAssetRelationTypes On dbo.tsysAssetRelationTypes.RelationTypeID = dbo.tblAssetRelations.Type Inner Join dbo.tblAssetCustom On dbo.tblAssets.AssetID = dbo.tblAssetCustom.AssetID Inner Join dbo.tsysAssetTypes On dbo.tsysAssetTypes.AssetType = dbo.tblAssets.Assettype Left Join dbo.tblOperatingsystem On dbo.tblAssets.AssetID = dbo.tblOperatingsystem.AssetID Left Join dbo.tblADComputers On dbo.tblAssets.AssetID = dbo.tblADComputers.AssetID Inner Join dbo.tblState On dbo.tblState.State = dbo.tblAssetCustom.State Left Join dbo.tblLinuxSystem On dbo.tblAssets.AssetID = dbo.tblLinuxSystem.AssetID Left Join dbo.tsysOS On dbo.tblAssets.OScode = dbo.tsysOS.OScode Left Join dbo.tblMacOSInfo On dbo.tblAssets.AssetID = dbo.tblMacOSInfo.AssetID Order By dbo.tblAssets.AssetName) AS [T1]
[DEBUG] 2020-09-07 12:09:00.871 [Ruby-0-Thread-23: :1] jdbc - Executing JDBC query {:statement=>"SELECT TOP 1 dbo.tblAssets.AssetID, dbo.tblAssets.AssetName, dbo.tsysAssetTypes.AssetTypename As Type, dbo.tblAssets.IPAddress, dbo.tblAssetCustom.Manufacturer, dbo.tblAssetCustom.Model, dbo.tblAssets.Domain, Case dbo.tsysAssetTypes.AssetTypename When 'Windows' Then dbo.tsysOS.OSname When 'Linux' Then dbo.tblLinuxSystem.OSRelease When 'Apple Mac' Then dbo.tblMacOSInfo.KernelVersion Else '' End As OS, dbo.tblAssets.Mac As MAC_Address, dbo.tblADComputers.OU, dbo.tblState.Statename, dbo.tblAssets.Description, dbo.tblAssetCustom.PurchaseDate, dbo.tblAssetCustom.Warrantydate, dbo.tblAssets.FQDN, dbo.tblAssetCustom.DNSName, dbo.tblAssetCustom.LastPatched, dbo.tblAssetCustom.LastFullbackup, dbo.tblAssetCustom.LastFullimage, dbo.tblAssetCustom.Location, dbo.tblAssetCustom.Building, dbo.tblAssetCustom.Department, dbo.tblAssetCustom.Branchoffice, dbo.tblAssetCustom.BarCode, dbo.tblAssetCustom.Contact, dbo.tblAssetCustom.Serialnumber, dbo.tblAssetCustom.OrderNumber, dbo.tblAssets.Firstseen, dbo.tblAssets.Lastseen, dbo.tblAssets.Lasttried From dbo.tblAssets Left Join dbo.tblAssetRelations On dbo.tblAssetRelations.ChildAssetID = dbo.tblAssets.AssetID Left Join dbo.tsysAssetRelationTypes On dbo.tsysAssetRelationTypes.RelationTypeID = dbo.tblAssetRelations.Type Inner Join dbo.tblAssetCustom On dbo.tblAssets.AssetID = dbo.tblAssetCustom.AssetID Inner Join dbo.tsysAssetTypes On dbo.tsysAssetTypes.AssetType = dbo.tblAssets.Assettype Left Join dbo.tblOperatingsystem On dbo.tblAssets.AssetID = dbo.tblOperatingsystem.AssetID Left Join dbo.tblADComputers On dbo.tblAssets.AssetID = dbo.tblADComputers.AssetID Inner Join dbo.tblState On dbo.tblState.State = dbo.tblAssetCustom.State Left Join dbo.tblLinuxSystem On dbo.tblAssets.AssetID = dbo.tblLinuxSystem.AssetID Left Join dbo.tsysOS On dbo.tblAssets.OScode = dbo.tsysOS.OScode Left Join dbo.tblMacOSInfo On dbo.tblAssets.AssetID = dbo.tblMacOSInfo.AssetID Order By dbo.tblAssets.AssetName", :parameters=>{:sql_last_value=>2020-09-07 10:03:00 UTC}, :count=>1}
[DEBUG] 2020-09-07 12:09:00.876 [Ruby-0-Thread-23: :1] jdbc - (0.001505s) SELECT TOP 1 dbo.tblAssets.AssetID, dbo.tblAssets.AssetName, dbo.tsysAssetTypes.AssetTypename As Type, dbo.tblAssets.IPAddress, dbo.tblAssetCustom.Manufacturer, dbo.tblAssetCustom.Model, dbo.tblAssets.Domain, Case dbo.tsysAssetTypes.AssetTypename When 'Windows' Then dbo.tsysOS.OSname When 'Linux' Then dbo.tblLinuxSystem.OSRelease When 'Apple Mac' Then dbo.tblMacOSInfo.KernelVersion Else '' End As OS, dbo.tblAssets.Mac As MAC_Address, dbo.tblADComputers.OU, dbo.tblState.Statename, dbo.tblAssets.Description, dbo.tblAssetCustom.PurchaseDate, dbo.tblAssetCustom.Warrantydate, dbo.tblAssets.FQDN, dbo.tblAssetCustom.DNSName, dbo.tblAssetCustom.LastPatched, dbo.tblAssetCustom.LastFullbackup, dbo.tblAssetCustom.LastFullimage, dbo.tblAssetCustom.Location, dbo.tblAssetCustom.Building, dbo.tblAssetCustom.Department, dbo.tblAssetCustom.Branchoffice, dbo.tblAssetCustom.BarCode, dbo.tblAssetCustom.Contact, dbo.tblAssetCustom.Serialnumber, dbo.tblAssetCustom.OrderNumber, dbo.tblAssets.Firstseen, dbo.tblAssets.Lastseen, dbo.tblAssets.Lasttried From dbo.tblAssets Left Join dbo.tblAssetRelations On dbo.tblAssetRelations.ChildAssetID = dbo.tblAssets.AssetID Left Join dbo.tsysAssetRelationTypes On dbo.tsysAssetRelationTypes.RelationTypeID = dbo.tblAssetRelations.Type Inner Join dbo.tblAssetCustom On dbo.tblAssets.AssetID = dbo.tblAssetCustom.AssetID Inner Join dbo.tsysAssetTypes On dbo.tsysAssetTypes.AssetType = dbo.tblAssets.Assettype Left Join dbo.tblOperatingsystem On dbo.tblAssets.AssetID = dbo.tblOperatingsystem.AssetID Left Join dbo.tblADComputers On dbo.tblAssets.AssetID = dbo.tblADComputers.AssetID Inner Join dbo.tblState On dbo.tblState.State = dbo.tblAssetCustom.State Left Join dbo.tblLinuxSystem On dbo.tblAssets.AssetID = dbo.tblLinuxSystem.AssetID Left Join dbo.tsysOS On dbo.tblAssets.OScode = dbo.tsysOS.OScode Left Join dbo.tblMacOSInfo On dbo.tblAssets.AssetID = dbo.tblMacOSInfo.AssetID Order By dbo.tblAssets.AssetName
The simple statement writes events to the file defined in logstash output, but the other statement doesn´t and also doesn´t show any error!?