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

No output when creating muting rules #1568

Open
bertrandretif opened this issue Mar 13, 2024 · 0 comments
Open

No output when creating muting rules #1568

bertrandretif opened this issue Mar 13, 2024 · 0 comments

Comments

@bertrandretif
Copy link

bertrandretif commented Mar 13, 2024

Description

When I create a muting rule with newrelic-cli, the rule is properly created but output JSON is empty.
Muting rule Id should be returned as it is with curl command.

Go Version

Go not installed, use of newrelic-cli

$ newrelic --version
newrelic version 0.78.17

Current behavior

When I run this command (generated from NerdGraph API Explorer), returned JSON is empty

NEW_RELIC_REGION=eu NEW_RELIC_API_KEY=XXXXX newrelic nerdgraph query 'mutation {
  alertsMutingRuleCreate(
    accountId: 00000
    rule: {name: "dev-paris deployment 2", description: "Muting rule created with newrelic-cli", enabled: true, condition: {conditions: {attribute: "conditionId", operator: IN, values: ["XXXX", "YYYY"]}, operator: AND}}
  ) {
    id
  }
}' 
{}

Expected behavior

Get the same output than curl command:

NEW_RELIC_REGION=eu NEW_RELIC_API_KEY=XXXXX newrelic nerdgraph query 'mutation {
  alertsMutingRuleCreate(
    accountId: 000000
    rule: {name: "dev-paris deployment 2", description: "Muting rule created with newrelic-cli", enabled: true, condition: {conditions: {attribute: "conditionId", operator: IN, values: ["XXXX", "YYYY"]}, operator: AND}}
  ) {
    id
  }
}' 
{"data":{"alertsMutingRuleCreate":{"id":"XXXXX"}}}

Steps To Reproduce

Steps to reproduce the behavior:

  1. Create alertsMutingRuleCreate query in nergraph API explorer
  2. Copy as newrelic-cli
  3. Run command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant