Skip to content

Flex integration and Powershell Scripts #333

Open
@gcalzetta

Description

Description

Hello Support,
We have been having issues with New Relic Flex integration when we use it to run a powershell script.
When the script contains an admin command it fails
Here is the yaml config file for flex :

integrations:

  • name: nri-flex
    interval: 300s
    timeout: 60s
    config:
    name: NAME
    apis:
    - name: NAME2
    - event_type: EVENT-TYPE
    shell: powershell
    commands:
    - run: "& "C:/Program Files/New Relic/newrelic-infra/integrations.d/script.ps1""

Expected Behavior

The integration works fine and the script run as aspected unless, in the script, there is an admin command.

Steps to Reproduce

The following commands, for example, need admin rights to be executed.

  1. Import-Module WebAdministration
  2. aws s3 ls s3://.........
    If I put one of these commands in the powershell script, the script fails when launched from flex.
    If I run the script manually under an admin user, the script works fine.

Your Environment

The New Relic agent runs as 'Local System' under "Windows Server 2008 R2 Standard". The problem occurs also if I force the New Relic Agent to run under any admin user.

Are you aware of this issue ?
Do you have any workaround ?

cheers

Metadata

Assignees

No one assigned

    Labels

    triage/pendingIssue or PR is pending for triage and prioritization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions