Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,363,581
Community Members
 
Community Events
168
Community Groups

Need assistance with Jira Insight Discovery custom SNMP scanning

Hello Everyone!

As our company is moving to Jira Service Management, we recently purchased and began using the Jira Insight Discovery Tool. I have set up and successfully executed many scans for our standard desktop, laptops, and networking equipment. Now, I would like to move into using the tool to scan more in-depth information from some of our other network-attached devices using SNMP. I used the following articles and steps below to configure the scans, but I am continuing to run into the issue described below. I reached out to the Jira Service Management support team but they notified me that my issues are outside of the scope of their support and they suggested I reach out to the community here. Any help would be appreciated!

 

Environment: Jira Cloud, Insight Discovery Tool Version 3.0.3.0

 

Articles Referenced:

https://documentation.mindville.com/display/INSDISC/Update+2.x+to+3.x

https://documentation.mindville.com/display/IDV229/Patterns

 

Our Goal:

  1. Identify the device type and manufacturer of our network devices that we want to scan with Discovery scanner using SNMP
  2. Research the MIBs and OIDs for each manufacturer/device type
  3. Use these collected OIDs to build custom SNMP patterns for each manufacturer/device type
  4. Scan the desired device information from these network devices using the custom SNMP patterns in the Discovery tool

 

What I have Tried:

While we are still testing whether this method will accomplish our goals, I have only written one custom SNMP pattern using the documentation on mindville. I have tried several different structure/logic methods but I cannot seem to get any of the scanned information into the actual scan result file produced by the discovery tool.

Using an SNMP walk tool I verified the OIDs that I am using in the custom pattern will collect the desired information. Looking through the logs of the tool, it looks like the pattern is able to collect the information, the issue is that this information doesn't seem to be tied to the scanned device in the scan results file.

 

In the logs I can see this:

 

6/1/2021 9:35:49 AM : Using pattern: SNMP_NetworkPrinter_HP.pat (v1.0)

6/1/2021 9:35:49 AM : Processing 4 SNMP results.

6/1/2021 9:35:49 AM : Command:

1.3.6.1.4.1.11.2.4.3.10.8.0;1.3.6.1.2.1.25.3.2.1.3.1;1.3.6.1.2.1.43.5.1.1.17.1;1.3.6.1.2.1.43.9.2.1.8.1.1

6/1/2021 9:35:49 AM : Result:

1.3.6.1.4.1.11.2.4.3.10.8.0: *REMOVED FOR POST*

1.3.6.1.2.1.25.3.2.1.3.1: HP LaserJet P4014

1.3.6.1.2.1.43.5.1.1.17.1: *REMOVED FOR POST*

1.3.6.1.2.1.43.9.2.1.8.1.1: Hewlett-Packard

 

However, when I look at the scan result file, I do not see this information:

ScanResult.png

 

After talking with Atlassian, they instructed me to use the SNMP Extended Values list scanning method to scan for these additional attributes. I may be incorrect in my understanding but as long as I am using SNMP_GET or SNMP_WALK to scan for attributes that already exist in the DeviceInfo-Object, like Serialnumber, Hostname, Model, and Vendor, I shouldn't have to use an ExtendedInformation list to map to object attributes. Looking in the ObjectHashSettings.xml document, that should be the following attributes.

<!-- DeviceInfo Attributes -->

<DeviceInfo_Hostname>true</DeviceInfo_Hostname>

<DeviceInfo_FQDN>true</DeviceInfo_FQDN>

<DeviceInfo_Location>false</DeviceInfo_Location>

<DeviceInfo_Contact>false</DeviceInfo_Contact>

<DeviceInfo_Type>false</DeviceInfo_Type>

<DeviceInfo_Model>true</DeviceInfo_Model>

<DeviceInfo_Serialnumber>true</DeviceInfo_Serialnumber>

<DeviceInfo_Vendor>true</DeviceInfo_Vendor>

<DeviceInfo_FirstNICMAC>false</DeviceInfo_FirstNICMAC>

<DeviceInfo_SystemUpTime>false</DeviceInfo_SystemUpTime>

<DeviceInfo_SystemUpTimeMinutes>false</DeviceInfo_SystemUpTimeMinutes>

<DeviceInfo_RAM>false</DeviceInfo_RAM>

 

Please let me know if I am thinking of this incorrectly. I did try using the example SNMP Extended Values Scan type using the provided example in the documentation but when I try to execute it, I get the following error. 

ExtendedValuesError.png

 

Original Pattern File:

<?xml version="1.0" encoding="utf-8"?>

<ScanPattern xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<Version>1.0</Version>

<PatternID>Network-Printer-HP-SNMP-1</PatternID>

<OrderNr>0</OrderNr>

<ProcessType>SNMP_GET</ProcessType>

<PatternType>Device</PatternType>

<Command>

    <![CDATA[

    1.3.6.1.4.1.11.2.4.3.10.8.0;1.3.6.1.2.1.25.3.2.1.3.1;1.3.6.1.2.1.43.5.1.1.17.1;1.3.6.1.2.1.43.9.2.1.8.1.1

    ]]>

</Command>

<Processing>

    <![CDATA[

    using System;

    using System.Collections.Generic;

    using Insight.Discovery.InfoClasses.CommandResult.ResultTypes;

    using Insight.Discovery.Tools;

    using Insight.Discovery.InfoClasses;

    using Insight.Discovery.InfoClasses.CommandResult;

    

    namespace Insight.Discovery

    {

        public class PatternExec

        {

            public void PerformAction(object[] parameters)

            {

                DeviceInfo deviceInfo = (DeviceInfo)parameters[2];

           

                try

                {

                    var commandResult = (SNMPExecuteResult)parameters[0];

                    commandResult.LogResult();

 

                    foreach (KeyValuePair<string, object> item in commandResult)

                    {

                        switch (item.Key)

                        {

                       

                            case "1.3.6.1.4.1.11.2.4.3.10.8.0": // OID to get Hostname

                                if (item.Value != null)

                                {

                                    try

                                    {

                                        deviceInfo.Hostname = item.Value.ToString().Replace("\n", "").Trim();

                                    }

                                    catch

                                    {

                                        //

                                    }

                                }

                                break;

 

                            case "1.3.6.1.2.1.25.3.2.1.3.1": // OID to get Model

                                if (item.Value != null)

                                {

                                    try

                                    {

                                        deviceInfo.Model = item.Value.ToString().Replace("\n", "").Trim();

                                    }

                                    catch

                                    {

                                        //

                                    }                       

                                }

                                break;

 

                            case "1.3.6.1.2.1.43.5.1.1.17.1": // OID to get Serial Number

                                if (item.Value != null)

                                {

                                    try

                                    {

                                        deviceInfo.Serialnumber = item.Value.ToString().Replace("\n", "").Trim();

                                    }

                                    catch

                                    {

                                        //

                                    }

                                }

                                break;

 

                            case "1.3.6.1.2.1.43.9.2.1.8.1.1": // OID to get Vendor

                                if (item.Value != null)

                                {

                                    try

                                    {

                                        deviceInfo.Vendor = item.Value.ToString().Replace("\n", "").Trim();

                                    }

                                    catch

                                    {

                                        //

                                    }

                                }

                                break;

                        }

                    }

                }

                catch (Exception ex)

                {

                    LogService.Instance.LogDebug("Error: Unable to get device information using SNMP pattern.", ex);

                }

            }

        }

    }

    ]]>

  </Processing>

</ScanPattern>

1 answer

Hello Alexander,

I would like to set this up as well. Were you able to get this working?

Hello Alan,

Unfortunately, I was not able to get this working and we ended up switching to a different asset discovery tool. 

Hi @Alexander Savitt  which Discovery tool did you switch too?

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events