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;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. What about Windows?
2. Can a serial number be obtained via SNMP scan (for standard devices)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can take a look to the SNMP Pattern files that are delivered in the package
our take a look to our documentation :)
3.1 describes how SNMP Pattern working
// Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.