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
    • 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
  • Downloads
  • Swag Shop
  • PARTNERS
    • Business Partners
    • Technology Partners
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

IElementConnection for get IP

Solved96 views13th August 2025
0
Juan Falcon231 12th August 2025 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 13th August 2025

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Mauro Druwel [SLC] [DevOps Advocate]468 Posted 13th August 2025 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 14th August 2025
Juan Falcon commented 13th August 2025

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 14th August 2025

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