Hi :)

Is there a posibility to scan via SNMP Linux hosts, and gather more informaction (similar level of information scanned like SSH)?

2 answers

Hi Marcin,

you can install SNMP to an Linux system.

But you will not get that information details like running the ssh commands.

Maybe it will be possible to write Mib packages to get all that informations but that are out of my expertise.

// Christian

1. What about Windows?

2. Can a serial number be obtained via SNMP scan (for standard devices)?

Hi Marcin,

that is the same answer.

I don't know if there is a Mib package available for Windows

that provides that information.

// Christian

Hi again, Chris. :)

Can someone help me with these mib packages? Or can you suggest how can I learn it? Is it complex? Will it be doable to configure it on XXX machines in a finite time? Any information will be helpful.

Thanks :)

Hi Marcin,

we only can help to create custom pattern if you have Mib Number with results etc.

As I wrote that we don't know if SNMP packages for Windows are available

(I think there will be) but you need to do that research and installing/configuration

by your own. We only cover the part to discover data and managing the data

not to enable systems to delivering data.

 

// Christian

Ok, can you tell me if I understand correctly:

If I would like to use mib on Linux I need to install the Insight Discovery on the Linux machine that I have the mib packages, right? So the snmp will use them.

No, that is not correct.

If you want to use SNMP you need to install an SNMP Demon on that host

(doesn't matter if Linux or Windows)

The Discovery-Tool can run anywhere else

it will use the SNMP Protocol to collect data from the server via SNMP.

But always keep in mind SNMP will deliver less information.

You should always prioritize the other protocols (SSH, WMI, Powershell)

 

// Christian

But Insight Discovery can collect data without any agent/Deamon via SNMP. Does the MIB packeges requier agent/Deamon?

We won't be able to scan via SSH and WMI unfortunately.

And MIB can help us access more information about routers, switches etc. information.

Hmm but maybe it would be good to get at first some information about what SNMP is and how it works.

https://en.wikipedia.org/wiki/Simple_Network_Management_Protocol

https://en.wikipedia.org/wiki/Management_information_base

 

To collect data from a Host via SNMP needs of course something at the server that will delivering that informations. So yes on servers you need to install something.

Most NetworkDevices like Switches, Routers etc. have SNMP out of the box but not server.

// Christian

Ok, these I have, host doesn't bother me. The mib files does. Do these need to be imported on the server that is a scanner?

 

But you want to collect information from hosts (server)?

The Mib's doesn't need to be "imported" on the server that is running the Discovery-Tool

In the Pattern-Files are described which OID delivering which information.

// Christian

Yes I want to collect information from hosts that are configured for SNMP scan. Infrastructure is already using MIB and doing their custom scans, and I get information that MIB has to be configured on "side of scanning device". And now I wonder, how to tell Insight Disovery to use these MIB scanning via SNMP.

Now the information from Windows and Linux hosts are basic.

You can take a look to the SNMP Pattern files that are delivered in the package

our take a look to our documentation :)

https://documentation.riada.se/insight-discovery/latest/discovery-documentation/set-up-discovery/patterns

3.1 describes how SNMP Pattern working

 

// Christian

Hi

I am writing a pattern, can you take a look? Also got a question. How ExtendedValues for SNMP shoes in JIRA Insigiht? Can I define to collect the data in a custom Insight atribute?

<?xml version="1.0" encoding="utf-8"?>
<!--
© Riada Development AB
v 3.0.0
-->
<ScanPattern xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<PatternID>UNITEAM-Cust-SNMP-1</PatternID>
<OrderNr>0</OrderNr>
<ProcessType>SNMP_GET</ProcessType>
<PatternType>SNMPExtendedValues</PatternType>
<Command>
<![CDATA[
1.3.6.1.4.1.9.9.46.1.2.1.1.2
]]>
</Command>
<Processing>
<![CDATA[
using System;
using Insight.Discovery.Tools;
using Insight.Discovery.InfoClasses;
using System.Collections.Generic;

namespace Insight.Discovery {
public class PatternExec {
public List<ExtendedInformation> PerformAction(object[] parameters)
{
if (parameters[0] == null) return null;

List<ExtendedInformation> ret = null;
List<ExtendedInformation> input = null;

try
{
LogService.Instance.LogDebug("Command: " + (parameters[1]).ToString().Trim());

input = (List<ExtendedInformation>)parameters[0];

ret = new List<ExtendedInformation>();

foreach (ExtendedInformation item in input)
{
LogService.Instance.LogDebug("Result for: " + item.Name + " = " + item.Value);
ExtendedInformation extInfo = null;

try
{
extInfo = new ExtendedInformation()
{
Name = "managementDomainName",
Value = input.Value.ToString()
};
}
catch (Exception ex)
{ LogService.Instance.LogDebug("Error Value is wrong", ex); }
if (extInfo != null)
{
ret.Add(extInfo);
}
}
}
catch (Exception ex)
{ LogService.Instance.LogDebug("Error getting Extendet SNMP RAM Informations", ex); }
finally
{
if (input != null)
input = null;
}
return ret;
}
}
}
]]>
</Processing>
</ScanPattern>

Hi,

here a fixed perfomeaction method:

(sorry that platform is not good to post code snipets, maybe you will/can create support tickets at our portal for requesting custom pattern support in future)

And yes you can map the result to an attribute (of course)

place a result file that containing the extended information in the import folder,

go to the import configuration and the drop down will show up the exetendet information as locator: in that case "managementDomainName"

 

public List<ExtendedInformation> PerformAction(object[] parameters)
{
if (parameters[0] == null) return null;

List<ExtendedInformation> ret = null;
List<ExtendedInformation> input = null;

try
{
LogService.Instance.LogDebug("Command: " + (parameters[1]).ToString().Trim());

input = (List<ExtendedInformation>)parameters[0];

ret = new List<ExtendedInformation>();

foreach (ExtendedInformation item in input)
{
LogService.Instance.LogDebug("Result for: " + item.Name + " = " + item.Value);
ExtendedInformation extInfo = null;

if (item.Name == "1.3.6.1.4.1.9.9.46.1.2.1.1.2")
{
try
{
extInfo = new ExtendedInformation()
{
Name = "managementDomainName",
Value = item.Value.ToString()
};
}
catch (Exception ex)
{ LogService.Instance.LogDebug("Error Value is wrong", ex); }
if (extInfo != null)
{
if (ret.IsNullOrEmpty())
ret = new List<ExtendedInformation>();
ret.Add(extInfo);
}
}
}
}
catch (Exception ex)
{ LogService.Instance.LogDebug("Error getting Extendet SNMP RAM Informations", ex); }
finally
{
if (input != null)
input = null;
}
return ret;
}

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

263 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you