Skip to content
DataMiner Dojo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
      • Learn more about Agile
        • Agile Webspace
        • Everything Agile
          • The Agile Manifesto
          • Best Practices
          • Retro Recipes
        • Methodologies
          • The Scrum Framework
          • Kanban
          • Extreme Programming
        • Roles
          • The Product Owner
          • The Agile Coach
          • The Quality & UX Coach (QX)
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Pogram
    • DataMiner DevOps Support
    • Feature Suggestions
  • Swag Shop
  • PARTNERS
    • Business Partners
    • Technology Partners
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

IElementConnection for get IP

Solved59 views2 days ago
0
Juan Falcon231 3 days ago 0 Comments

Hello

How can i use the Interface IElementConnection to get the IP of polling for elements? it for process an inventory.

Thanks

Juan

Juan Falcon Selected answer as best 2 days ago

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Mauro Druwel [SLC] [DevOps Advocate]358 Posted 2 days ago 2 Comments

Hi Juan,

I believe this is what you meant, but I'm not completely sure. First, you'll need to determine the type of connection. If it's an HTTP connection, you can retrieve the IP address like this (connection is of type IElementConnection):
foreach (var connection in connections)
{
IHttpConnection httpConnection = connection as IHttpConnection;
if (httpConnection != null)
{
var remoteHost = httpConnection.TcpConfiguration.RemoteHost;
// Use remoteHost as needed
}
}

Mauro Druwel [SLC] [DevOps Advocate] Posted new comment 1 day ago
Juan Falcon commented 2 days ago

Thanks this is what i need, i used with snmp version
var connections = element.Connections;
foreach(var connection in connections)
{
ISnmpConnection snmpConnection = connection as ISnmpConnection;
if (snmpConnection != null)
{
ip = snmpConnection.UdpConfiguration.RemoteHost;
}
}

Mauro Druwel [SLC] [DevOps Advocate] commented 1 day ago

Glad it helped! I actually pulled that from the DataMiner docs, there's a good example on how to create an element with connections:
https://docs.dataminer.services/develop/devguide/ClassLibrary/ClassLibraryElementCreation.html#creating-an-element-with-connections
I just used some basic C# casting to check if the connection was HTTP and then grabbed the IP from TcpConfiguration.RemoteHost.

You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin