Skip to content

Latest commit

 

History

History
75 lines (56 loc) · 3.78 KB

6.logs-connection-data.md

File metadata and controls

75 lines (56 loc) · 3.78 KB

Deeper CLI - Capturing Logs & Connection Data

With your host system and Deeper Connect device being successfully monitored we can now proceed to backing up our logs and connection data!


Prerequisite:

  • Ensure you have moved the logging configuration file that was documented in the prior step.

We will need to edit that same configuration file we previously worked with. We did not do this at the same time previously as we want to ensure our Deeper Connect device is reporting in New Relic first.

Again, please do not use notepad or a basic text editor when editing .yml files, formatting and indentation are extremely important!

Your configuration file will be in one of the following locations, dependent on your operating system

  • Windows: C:\Program Files\New Relic\newrelic-infra\integrations.d win conf example

  • Linux: /etc/newrelic-infra/integrations.d/ nix conf example

  • Mac: /etc/newrelic-infra/integrations.d/

Open your configuration file with your editor of choice, and remove the single hashtags on the left to uncomment the block.

Your configuration file should look something like below.

---
integrations:
  - name: deeper-cli
    interval: 30s # how often the integration will collect data
    env:
      DEVICE_NAME: My Deeper Mini 01 # optional name to identify your deeper device
      DEVICE_TYPE: mini # optionally define your device type, eg. mini, nano, genesis
      NEWRELIC_OUTPUT: true # required to automatically format the output to new relic compatible
      NEWRELIC_ACCOUNT_ID: 1234 # replace with your account id
      NEWRELIC_INSERT_API_KEY: NRII-ABCDEF # replace with your insert key
  - name: deeper-cli # generate peer data
    interval: 1m
    env:
      DEVICE_NAME: My Deeper Mini 01 # optional name to identify your deeper device
      DEVICE_TYPE: mini # optionally define your device type, eg. mini, nano, genesis
      NEWRELIC_OUTPUT: true # required to automatically format the output to new relic compatible
      GET_PEER_LIST: true # generate peer list data
      NEWRELIC_ACCOUNT_ID: 1234 # replace with your account id
      NEWRELIC_INSERT_API_KEY: NRII-ABCDEF # replace with your insert key
      NEWRELIC_NERDGRAPH_KEY: NRAK-ABCDEF # replace with your user api key https://one.newrelic.com/launcher/api-keys-ui.launcher
  - name: deeper-cli # generate logs
    interval: 1m
    env:
      DEVICE_NAME: My Deeper Mini 01
      DEVICE_TYPE: mini # optionally define your device type, eg. mini, nano, genesis
      GET_SHARING_LOGS: 1 # get 1 day worth of sharing logs
      DECORATE_LOG_META: true # add additional log metadata to improve querying
      RAW: true # raw log lines
      NEW_ONLY: true # only output new logs
      OUTPUT_FILE: "/var/db/newrelic-infra/newrelic-integrations/bin/.deeper-logs/sharing.log" # location of where the log file will be written too
      NEWRELIC_ACCOUNT_ID: 1234 # replace with your account id
      NEWRELIC_NERDGRAPH_KEY: NRAK-ABCDEF # replace with your user api key https://one.newrelic.com/launcher/api-keys-ui.launcher

If you need a full configuration file reference see:

Restart the New Relic Infrastructure agent for good measure as before in the previous step.

With the defined configuration above, one day worth of logs will be shipped then subsequently only new logs after that.