[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flex integration and Powershell Scripts #333

Open
gcalzetta opened this issue Jan 11, 2022 · 2 comments
Open

Flex integration and Powershell Scripts #333

gcalzetta opened this issue Jan 11, 2022 · 2 comments
Labels
triage/pending Issue or PR is pending for triage and prioritization.

Comments

@gcalzetta
Copy link

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

@gcalzetta gcalzetta changed the title Flex integration and Powershell Scipt Flex integration and Powershell Scripts Jan 11, 2022
@davidgit davidgit added the triage/pending Issue or PR is pending for triage and prioritization. label Sep 13, 2022
@LLHogia
Copy link
LLHogia commented Oct 9, 2023

@davidgit Do you have an update for this? I have the same problem. PowerShell script can run as admin but not within New Relic. I'm getting permission denied. I have also tried invoking another PowerShell script using a specific domain user. It works fine within the PowerShell ISE but not via Flex.

@LLHogia
Copy link
LLHogia commented Oct 17, 2023

@gcalzetta Please read the Workaround section in this bug:
#448

However, I would like to see this as a native support in nri-flex. It would be very good to be able to specify a username and password which the PowerShell script should run as.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/pending Issue or PR is pending for triage and prioritization.
Projects
None yet
Development

No branches or pull requests

3 participants