Nominating Presidential Muppets
    Wondering what’s next for npm?Check out our public roadmap! »

    @itentialopensource/app-network_tools

    1.0.2 • 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 either of the following methods:

    • git
      • git clone this repo using the git clone git@gitlab.com:itentialopensource/applications/app-network_tools.git command
      • cd onto the repo folder and run npm i to install all dependencies
      • place the app in the appropriate folder within your IAP installation (node_modules/@itentialopensource/app-network_tools)
    • npm
      • use the following npm command to install app onto IAP: npm i @itentialopensource/app-network_tools
      • verify that app is located in the appropriate folder within IAP (node_modules/@itentialopensource/app-network_tools)

    To complete the installation, please restart IAP. Verify that app is running using the setting or admin_essentials view

    How to Run

    After verifying that App is running, navigate to workflow builder/automation studio, and build a new flow. On the right sidebar you will find App Network Tools cog and all its avialable tasks.

    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

    A sample automation is available under the workflows folder of this repo (simply import the JSON file onto automation studio):

    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

    3

    Version

    1.0.2

    License

    Apache-2.0

    Unpacked Size

    1.19 MB

    Total Files

    28

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar