Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
/*
@RuleName = JBoss Enterprise Application Platform
@SoftwareName = JBoss Enterprise Application Platform
@RuleStatus = Not Verified
@RuleCategory = JBoss Enterprise Application Platform
@Vendor = RedHat
*/


Search parameters:


In the example below we are searching for the process that has 'jboss-eap' in the process arguments. But does not contain string 'payment'. For this purpose we are employing pattern and anti pattern below:

...

Code Block
/*
@RuleName = JBoss Enterprise Application Platform
@SoftwareName = JBoss Enterprise Application Platform
@RuleStatus = Not Verified
@RuleCategory = JBoss Enterprise Application Platform
@Vendor = RedHat
*/

WITH SearchInProcessArguments
AS
(
    SELECT 'jboss-eap' AS Pattern, 'jboss-eap' AS Edition, 'payment' AS AntiPattern1, NULL AS AntiPattern2
    
       ) 

SELECT t.[DatasetID], t.[DeviceInstanceID], t.[Version], t.[Edition]

FROM
(
        SELECT 1 AS [Source],
            ROW_NUMBER() OVER( PARTITION BY di.[DatasetID], di.[DeviceInstanceID] ORDER BY lk_proc.[Name] ) AS [Qualifier],
            di.[DatasetID],
            di.[DeviceInstanceID],
            CONVERT(nvarchar(255), lk_arg.Name) AS [Version],
            t.Edition+'_Process' AS [Edition]
        FROM [hub].[AttributeDeviceInstanceProcess] a_dip WITH( NOLOCK )
        JOIN [hub].[DeviceInstance] di WITH( NOLOCK ) ON di.[DeviceInstanceID] = a_dip.[DeviceInstanceID]
        JOIN [hub].[LookupProcess] lk_proc WITH( NOLOCK ) ON lk_proc.[LookupProcessID] = a_dip.[LookupProcessID]
        JOIN [hub].[LookupArgument] lk_arg WITH( NOLOCK ) on lk_arg.[LookupArgumentID] = a_dip.[LookupArgumentID]
        JOIN SearchInProcessArguments t ON 1=1
        WHERE  1=1
            AND     lk_arg.[Name] LIKE N'%'+t.Pattern+'%'
            AND (t.AntiPattern1 IS NULL OR lk_arg.[Name] NOT LIKE N'%'+t.AntiPattern1+'%')
            AND (t.AntiPattern2 IS NULL OR lk_arg.[Name] NOT LIKE N'%'+t.AntiPattern2+'%')        
) t
WHERE t.[Qualifier] = 1
GO

Installation:

Once a new derived software rule is created place the SQL file into the derived software folder.

These rules are located in the iQSonar DataHub folder on your directory.  

iQuate > iQSonar DataHub > ETL > DerivedSoftware > *.sql

Once there on the next datahub import the rule will create extra application rows in the Datahub database.