This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Serials & Version SWQL Search Resource

Hi Community,

A nifty little resource to help you locate Serial numbers & Versions. Previously I using this as a report but i like the idea to be able to search for serial numbers and other asset information with the search function rather then selecting reports doing some Ctrl + F to find serials etc..

pastedImage_10.png

This resource is done using SWQL and the 'Custom Query' resource simply paste the following snippets in and enable the search check box and paste the second snippet there..and enjoy emoticons_happy.png

Query:

Select 

o.Caption AS [NODE],

o.detailsurl as [_linkfor_NODE],

HardwareRevision, FirmwareRevision, SoftwareRevision, Serial

FROM Cirrus.Nodes n

INNER JOIN Cirrus.EntityPhysical s ON n.nodeid = s.nodeid

INNER JOIN Orion.Nodes o ON o.nodeid = n.corenodeid

WHERE EntityClass IN ('2','3')

Search Query:

Select 

o.Caption AS [NODE],

o.detailsurl as [_linkfor_NODE],

HardwareRevision, FirmwareRevision, SoftwareRevision, Serial

FROM Cirrus.Nodes n

INNER JOIN Cirrus.EntityPhysical s ON n.nodeid = s.nodeid

INNER JOIN Orion.Nodes o ON o.nodeid = n.corenodeid

WHERE EntityClass IN ('2','3')

AND ( 

    o.Caption LIKE '%${SEARCH_STRING}%'OR

    s.HardwareRevision LIKE '%${SEARCH_STRING}%' OR  

    s.FirmwareRevision LIKE '%${SEARCH_STRING}%' OR 

    s.SoftwareRevision LIKE '%${SEARCH_STRING}%' OR

    s.Serial LIKE'%${SEARCH_STRING}%'

    ) 

the purpose of putting this in ncm is because this resource utilities the network inventory job emoticons_happy.png

cheers,

Dan

  • This is really useful, one question though....when the table is created, instead of the view that you show, I only see the numbers  for firmwarerevision and softwarerevision. Even when that information is populated on the node, it isn't transferred through to the table.

    any thoughts on why (I'm by no means a SWQL or SQL guy)

  • Hey, the information in this table is being polled from the ncm job inventory. Do you have serial numbers on custom properties or are you after serial numbers of servers etc?

  • I'm actually after the information that comes from the SoftwareRevision field.  Below yo ucan see where the Hardware version is populated with just "v02" and nothing for software or firmware revision. However, when you actually go to the node, that information is there in the details....so not sure what I need to adjust to get that.....

    pastedImage_0.png

    pastedImage_1.png

  • hey,

    apologizes for the delay try this out, here's what your looking for:

    Select

    o.Caption AS [NODE],

    o.detailsurl as [_linkfor_NODE],

    o.IOSVersion, Serial, o.machinetype

    FROM Cirrus.Nodes n

    INNER JOIN Cirrus.EntityPhysical s ON n.nodeid = s.nodeid

    INNER JOIN Orion.Nodes o ON o.nodeid = n.corenodeid

    WHERE EntityClass IN ('2','3')

    -----------------------------------------------------

    Select

    o.Caption AS [NODE],

    o.detailsurl as [_linkfor_NODE],

    IOSVersion, Serial, o.machinetype

    FROM Cirrus.Nodes n

    INNER JOIN Cirrus.EntityPhysical s ON n.nodeid = s.nodeid

    INNER JOIN Orion.Nodes o ON o.nodeid = n.corenodeid

    WHERE EntityClass IN ('2','3')

    AND (

        o.Caption LIKE '%${SEARCH_STRING}%'OR

        o.IOSVersion LIKE '%${SEARCH_STRING}%' OR 

        s.Serial LIKE'%${SEARCH_STRING}%' OR

        o.machinetype LIKE'%${SEARCH_STRING}%'

        )

  • I really can't tell you how great this is...THANK YOU so much. It looks great and even though I let them know I did hardly anything, but it still made me look like a Pro's Pro!!!

  • Hi

    can you please provide steps how to get this done ? I am able to get the first steps but can't find where the second snippet should go.

    Thanks!