Need private packages and team management tools?Check out npm Teams »

@itentialopensource/app-network_tools

0.1.1 • Public • Published

app-network_tools

An application to be used in Itential Automation Platform providing basic network operations, including a wrapper for dig tools using the NodeJS DNS module.

Allows DNS/dig commands to be used with Workflow Builder.

How to Install

In order to install app-network_tools, please use the App-Artifacts tool (Available for Itential customers via Nexus repo)

How to Run

After installing (via App-Artifacts) click the play button on the artifact card, or navigate to Workflow Builder and press the play button next to the app-network_tools Test workflow.

Available tasks

resolveHostName

  • resolveHostName performs DNS Lookup on one or 'ANY' DNS Record type and returns an array of record objects. The function wraps dns.resolve. Provide a hostname (e.g. google.com) and a record type (e.g. A), the task will return an array of objects or throw a DNS error. The getLastRecord option will pop the last item in the array and return an object.

resolveHostName

checkRecordExists

  • checkRecordExists performs DNS Lookup on one DNS Record type and returns a boolean true if the record exists. Use this task with an evaluation (Eval) task. The function wraps dns.resolve. Provide a hostname (e.g. google.com) and a record type (e.g. A), the task will return a boolean.

checkRecordExists

reverseIpAddr

  • reverseIpAddr performs Reverse DNS Lookup on only PTR records and returns an array of record objects. The function wraps dns.reverse. Provide an IP Address (e.g. 8.8.8.8), the task will return an array of objects or throw a DNS error. The getLastRecord option will pop the last item in the array and return an object.

reverseIpAddr

checkPTRRecordExists

  • checkPTRRecordExists performs Reverse DNS Lookup on only PTR records and returns a boolean true if the record exists. Use this task with an evaluation (Eval) task. The function wraps dns.reverse. Provide an IP Address (e.g. 8.8.8.8), the task will return a boolean.

checkPTRRecordExists

checkPortConnection

  • checkPortConnection checks the connection to a hostname on a port, and performs retries if necessary. Returns true on connection success, and returns false on timeout or error.

Sample Workflow

IAP Artifacts Network Tools - Test allows users to test the functionality of all available tasks of app-network_tools using customized values for the hostName, ipAddress, recordType, port, retries, and timeout variables.

app-network_tools Test workflow

Click the Play button (►) on the Workflow Builder page to start the workflow.

app-network_tools Test start workflow

Click "Start" after entering Job Description information.

app-network_tools Test job description

Replace "null" with desired values, with strings in quotes, and click "Start."

app-network_tools Test variables

Once the automated tasks are complete, click "Work Task" on the Details page for the workflow to view the report showing the inputs and outputs for each of the available tasks.

app-network_tools Test workflow report

Contributing to app-network_tools

Please check out the Contributing Guidelines.

License & Maintainers

Product License

Apache 2.0

Install

npm i @itentialopensource/app-network_tools

DownloadsWeekly Downloads

6

Version

0.1.1

License

Apache-2.0

Unpacked Size

1.23 MB

Total Files

28

Last publish

Collaborators

  • avatar
  • avatar
  • avatar