<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Remote TCP port monitoring in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260686#M34441</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I was already thought about that but:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I cannot deploy custom scripts in targets, no permissions.&lt;/LI&gt;&lt;LI&gt;Extra cost by metrics ingestion.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I would like to see some out-the-box solution already covered by OneAgent, since agent is already there.&lt;/P&gt;&lt;P&gt;But thank you so much for your detailed answer.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
    <pubDate>Fri, 25 Oct 2024 15:59:32 GMT</pubDate>
    <dc:creator>AntonPineiro</dc:creator>
    <dc:date>2024-10-25T15:59:32Z</dc:date>
    <item>
      <title>Remote TCP port monitoring</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260605#M34435</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am aware of NAM but source would be Synthetic ActiveGate.&lt;/P&gt;&lt;P&gt;Use case would be something as a host (not Synthetic ActiveGate) has TCP connectivity against some IP + port. Does Dynatrace have something for this monitoring out-of-the-box?&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 08:12:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260605#M34435</guid>
      <dc:creator>AntonPineiro</dc:creator>
      <dc:date>2024-10-25T08:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Remote TCP port monitoring</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260638#M34436</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/58682"&gt;@AntonPineiro&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;As per the latest Hub technologies you can install :&amp;nbsp;&lt;A href="https://www.dynatrace.com/hub/detail/snmp-autodiscovery/?query=SNMP+Autodiscovery&amp;amp;filter=all" target="_self"&gt;SNMP Autodiscovery&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Then create synthetic monitors for the detected IPs and Ports.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Hoping it adds value.&lt;BR /&gt;KR,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 11:58:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260638#M34436</guid>
      <dc:creator>Peter_Youssef</dc:creator>
      <dc:date>2024-10-25T11:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Remote TCP port monitoring</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260673#M34437</link>
      <description>&lt;P&gt;there's a work around you can use for this via local metric ingestion through OneAgent an this is a PowerShell script for doing this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;function Test-TcpConnection {
    param(
        [string]$MetricName,
        [string]$IPAddress,
        [int]$Port,
        [System.Threading.ManualResetEvent]$StopEvent,
        [int]$Interval
    )

    while ($StopEvent.WaitOne(0)) {
        try {
            $socket = New-Object System.Net.Sockets.TcpClient
            $socket.Connect($IPAddress, $Port)
            Write-Host "TCP connection to ${IPAddress}:${Port} successful"
            $result = 1
        } catch {
            Write-Host "TCP connection to ${IPAddress}:${Port} failed: $_"
            $result = 0
        } finally {
            if ($socket) { $socket.Close() }
	    $headers = @{
    		'Content-Type' = 'text/plain; charset=utf-8'
	    }
	    Invoke-RestMethod -Uri http://localhost:14499/metrics/ingest -Method Post -Body "${MetricName},destination-address=${IPAddress},destination-port=${Port} ${result}" -Headers @{'Content-Type' = 'text/plain; charset=utf-8'}

            Start-Sleep -Seconds $Interval
        }
    }

    Write-Host "Script stopped."
}

# Create a manual reset event to control the script's execution
$stopEvent = New-Object System.Threading.ManualResetEvent False

# Function to stop the script
function Stop-Script {
    $stopEvent.Set()
}

# Call the Test-TcpConnection function
Test-TcpConnection -MetricName "host.tcp-test.status" -IPAddress 127.0.0.1 -Port 80 -StopEvent $stopEvent -Interval 20&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using this approach you can ingest metrics from OneAgent on the desired machine as mentioned in the code the interval is each 20 seconds to test connectivity with &amp;lt;IP_ADDRESS&amp;gt;:&amp;lt;PORT&amp;gt; and you've status of 0 means that connection failed or 1 that connection successfully established, accordingly you can make custom event for alerting using the metric&amp;nbsp; `host.tcp-test.status` to get notified when metric value is 0, you can replace xxxx with the real host name you're ingesting your metric from if you willing to use it from multiple servers to use server name as dimension for filtering data points later.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MostafaHussein_1-1729866178943.png" style="width: 753px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/24152iDBE6D89D0E597CBE/image-dimensions/753x350?v=v2" width="753" height="350" role="button" title="MostafaHussein_1-1729866178943.png" alt="MostafaHussein_1-1729866178943.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when running this script from PowerShell you should find it in dynatrace like this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MostafaHussein_0-1729865990623.png" style="width: 759px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/24150iC8C7F52120F0B7B0/image-dimensions/759x215?v=v2" width="759" height="215" role="button" title="MostafaHussein_0-1729865990623.png" alt="MostafaHussein_0-1729865990623.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;references:&lt;BR /&gt;&lt;A href="https://docs.dynatrace.com/docs/shortlink/local-api#example" target="_blank"&gt;https://docs.dynatrace.com/docs/shortlink/local-api#example&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.dynatrace.com/docs/shortlink/metric-events" target="_blank"&gt;https://docs.dynatrace.com/docs/shortlink/metric-events&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 14:36:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260673#M34437</guid>
      <dc:creator>MostafaHussein</dc:creator>
      <dc:date>2024-10-25T14:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Remote TCP port monitoring</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260685#M34440</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am not sure this will work because Synthetic monitor is linked to ActiveGate. I would like to check from anothers machines that they are not ActiveGates.&lt;/P&gt;&lt;P&gt;But thank you!&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 15:55:55 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260685#M34440</guid>
      <dc:creator>AntonPineiro</dc:creator>
      <dc:date>2024-10-25T15:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Remote TCP port monitoring</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260686#M34441</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I was already thought about that but:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I cannot deploy custom scripts in targets, no permissions.&lt;/LI&gt;&lt;LI&gt;Extra cost by metrics ingestion.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I would like to see some out-the-box solution already covered by OneAgent, since agent is already there.&lt;/P&gt;&lt;P&gt;But thank you so much for your detailed answer.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 15:59:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260686#M34441</guid>
      <dc:creator>AntonPineiro</dc:creator>
      <dc:date>2024-10-25T15:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Remote TCP port monitoring</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260688#M34443</link>
      <description>&lt;P&gt;I'd love for this functionality to be built-in as a feature. The OneAgent network monitor already knows the common connections that are made to/from the host and could automatically setup monitors for these with a click of a button. Should I put this in as a product idea?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 16:15:07 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260688#M34443</guid>
      <dc:creator>StrangerThing</dc:creator>
      <dc:date>2024-10-25T16:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Remote TCP port monitoring</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260692#M34444</link>
      <description>&lt;P&gt;&lt;A href="https://community.dynatrace.com/t5/Product-ideas/Automatic-Network-Monitoring-at-Host-level-via-Davis-OneAgent/idi-p/260691" target="_blank"&gt;Automatic Network Monitoring at Host level via Davis/OneAgent - Dynatrace Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 17:16:28 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260692#M34444</guid>
      <dc:creator>StrangerThing</dc:creator>
      <dc:date>2024-10-25T17:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Remote TCP port monitoring</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260706#M34445</link>
      <description>&lt;P&gt;strongly recommend&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 22:22:10 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260706#M34445</guid>
      <dc:creator>MostafaHussein</dc:creator>
      <dc:date>2024-10-25T22:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Remote TCP port monitoring</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260713#M34447</link>
      <description>&lt;P&gt;Thank you all!&lt;/P&gt;&lt;P&gt;I have just voted that product idea!&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2024 13:07:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260713#M34447</guid>
      <dc:creator>AntonPineiro</dc:creator>
      <dc:date>2024-10-26T13:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Remote TCP port monitoring</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260717#M34449</link>
      <description>&lt;P&gt;All the best&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/58682"&gt;@AntonPineiro&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully it will be considered in upcoming releases.&lt;/P&gt;&lt;P&gt;KR,&lt;/P&gt;&lt;P&gt;Peter.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2024 14:23:10 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Remote-TCP-port-monitoring/m-p/260717#M34449</guid>
      <dc:creator>Peter_Youssef</dc:creator>
      <dc:date>2024-10-26T14:23:10Z</dc:date>
    </item>
  </channel>
</rss>

