LoginSignup
13
13

More than 5 years have passed since last update.

NewRelicで監視対象のサーバーをAPIを使って外す

Posted at

背景

NewRelic Serversから監視対象のサーバーを外すときにGUIの操作でどこから外せばいいかわからなかった(ちゃんと探せばあるんだろうが・・・)

解決策

NewRelicが公開しているAPIをたたいて監視対象のサーバーを外すことで対応

準備

  • 【API Key】AccountSettings→IntegrationsのAPI KeysからAPI Keyを発行しメモしておく
  • 【サーバーID】NewRelic Serversのサーバー単位の情報をみたときのURLの末尾の数値をメモしておく

実行

curl -X DELETE "https://api.newrelic.com/v2/servers/{サーバーID}.json" -H X-Api-Key:"{API KEY}" -i

という形で実行することで削除できました!
※これでレポートはされませんが、もう必要なければ別途サーバー側でNew Relicエージェントのアンインストールしましょう
https://docs.newrelic.com/docs/apm/new-relic-apm/installation-configuration/uninstall-agent

13
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
13