Our port monitoring integration monitors status for networking ports, such as TCP, UDP, etc., and reports uptime and outage data to New Relic.
팁
This integration is released as open source on Github. A change log is also available there for the latest updates. Support for this integration is available with an Expert Services subscription.
Install the integration
Follow the steps below to install the integration:
Install the infrastructure agent
To use the Port Monitoring integration, you need to first install the infrastructure agent on the same host. All our on-host integrations require the infrastructure agent, which helps expose and report metrics to New Relic.
Download and prepare the integration
Download and unpack the tar file from the GitHub repo:
bash$wget https://github.com/newrelic/nri-port-monitor/releases/download/1.3/nri-port-monitor.tar.gz && tar -zxvf nri-port-monitor.tar.gzCopy the
bin
directory withnri-port-monitor
executable to/var/db/newrelic-infra/newrelic-integrations
. Do the same for theport-monitor-definition.yml
config file:bash$cp nri-port-monitor/bin/port-monitor /var/db/newrelic-infra/newrelic-integrations/bin/ && cp nri-port-monitor/port-monitor-definition.yml /var/db/newrelic-infra/newrelic-integrations/Set execution permissions for the binary file
nr-port-monitor
so it can run correctly:bash$chmod +x /var/db/newrelic-infra/newrelic-integrations/bin/port-monitor
Configure the integration
Move and rename the configuration file:
bash$cp nri-port-monitor/port-monitor-config.yml.sample /etc/newrelic-infra/integrations.d/port-monitor-config.ymlOpen
port-monitor-config.yml
and edit the config with all the port instances you'd like to monitor:integration_name: com.newrelic.tcp-port-monitorinstances:- name: <INSTANCE IDENTIFIER>command: metricsarguments:address: localhost:80network: tcptimeout: 5labels:env: prod
Find your data
To easily find your Port Monitoring data, download our pre-built dashboard:
Go to one.newrelic.com and click on + Integrations & Agents.
Click on Dashboards tab.
In the search box, search for Port Monitoring.
Click on the Port Monitoring dashboard to install it.
Here's an example NRQL query that returns the status of configured ports:
SELECT latest(status) FROM NetworkPortSample FACET address SINCE 30 MINUTES AGO TIMESERIES