Applications Systems

SSL Certificate Expiration Report

To report on the expiration of SSL certificates, create a custom SQL report. This article provides both the instructions and the SQL query for building the SSL Expiration Report.

First published date

10/23/2018 6:53 PM

Last published date

4/23/2025 5:31 PM

Overview

SolarWinds does not provide an out-of-the-box solution for reporting on the expiration of SSL certificates. This article explains how to build this report. 

Product section

Server Application Monitor

Resolution

  1. Log in to the SolarWinds Platform Web Console and go to Settings > All Settings > Manage Reports.
  2. Click Create New Report.
  3. Add a custom table. Select Advanced Database Query (SQL, SWQL) in the selection method drop-down.
  4. Use one of the following queries:

 

  1. -- Scripts are not supported under any SolarWinds support program or service. 
    -- Scripts are provided AS IS without warranty of any kind. SolarWinds further 
    -- disclaims all warranties including, without limitation, any implied warranties 
    -- of merchantability or of fitness for a particular purpose. The risk arising 
    -- out of the use or performance of the scripts and documentation stays with you. 
    -- In no event shall SolarWinds or anyone else involved in the creation, 
    -- production, or delivery of the scripts be liable for any damages whatsoever 
    -- (including, without limitation, damages for loss of business profits, business 
    -- interruption, loss of business information, or other pecuniary loss) arising 
    -- out of the use of or inability to use the scripts or documentation.
    
    
    SELECT nd.Caption, nd.IP_Address, ccs.StatisticData AS 'Days Remaining',
    LEFT(SUBSTRING(ErrorMessage,
    CHARINDEX(':',ErrorMessage)+1,15),
    CHARINDEX('/',ErrorMessage)) AS 'Expiration Date'
    FROM [dbo].[APM_CurrentComponentStatus] ccs
    JOIN [APM_Component] c ON c.ID = ccs.ComponentID
    JOIN [APM_Application] a ON a.ID = c.ApplicationID
    JOIN [NodesData] nd ON nd.NodeId = a.NodeID
    WHERE c.ComponentType = '48'
    -------------------------------------------------------------
    (Please replace the "ApplicationNameHere" with the correct name)
    
    SELECT nod.SysName AS Node
      ,nod.IP_Address AS IP
          ,[ComponentPortNumber] AS Port
          ,[ComponentStatisticData] AS Days_Left
          ,[ErrorMessage] AS Message
          ,[LastTimeUp]        AS Last_Poll
      ,stat.[NodeID]
      FROM [SolarWindsOrion].[dbo].[APM_CurrentStatistics] AS stat JOIN
    [SolarWindsOrion].[dbo].[Nodes] as nod ON stat.NodeID = nod.NodeID
      WHERE ApplicationName = 'APPLICATIONNAMEHERE'
      Order By Days_Left, Node
  2. Select the SQL radio button and click Add To Layout.
  3. Add columns to the report (select all and click Add Column).
  4. Click Submit.
  5. Name the report and next through the rest of the report wizard.

 

Please note: This is a custom SQL report and therefore will not be supported by SolarWinds. This is for informational use only.