Skip to main content

monitors

Creates, updates, deletes, gets or lists a monitors resource.

Overview

Namemonitors
TypeResource
Idazure_isv.newrelic.monitors

Fields

NameDatatypeDescription
account_creation_sourcetextfield from the properties object
identitytextManaged service identity (system assigned and/or user assigned identities)
liftr_resource_categorytextfield from the properties object
liftr_resource_preferencetextfield from the properties object
locationtextThe geo-location where the resource lives
marketplace_subscription_idtextfield from the properties object
marketplace_subscription_statustextfield from the properties object
monitorNametextfield from the properties object
monitoring_statustextfield from the properties object
new_relic_account_propertiestextfield from the properties object
org_creation_sourcetextfield from the properties object
plan_datatextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
saa_s_azure_subscription_statustextfield from the properties object
subscriptionIdtextfield from the properties object
subscription_statetextfield from the properties object
tagstextResource tags.
user_infotextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTmonitorName, resourceGroupName, subscriptionIdGet a NewRelicMonitorResource
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList NewRelicMonitorResource resources by resource group
list_by_subscriptionSELECTsubscriptionIdList NewRelicMonitorResource resources by subscription ID
create_or_updateINSERTmonitorName, resourceGroupName, subscriptionId, data__propertiesCreate a NewRelicMonitorResource
deleteDELETEmonitorName, resourceGroupName, subscriptionId, userEmailDelete a NewRelicMonitorResource
updateUPDATEmonitorName, resourceGroupName, subscriptionIdUpdate a NewRelicMonitorResource
refresh_ingestion_keyEXECmonitorName, resourceGroupName, subscriptionIdRefreshes the ingestion key for all monitors linked to the same account associated to this monitor.
resubscribeEXECmonitorName, resourceGroupName, subscriptionId
switch_billingEXECmonitorName, resourceGroupName, subscriptionId, data__userEmailSwitches the billing for NewRelic monitor resource.
vm_host_payloadEXECmonitorName, resourceGroupName, subscriptionIdReturns the payload that needs to be passed in the request body for installing NewRelic agent on a VM.

SELECT examples

List NewRelicMonitorResource resources by subscription ID

SELECT
account_creation_source,
identity,
liftr_resource_category,
liftr_resource_preference,
location,
marketplace_subscription_id,
marketplace_subscription_status,
monitorName,
monitoring_status,
new_relic_account_properties,
org_creation_source,
plan_data,
provisioning_state,
resourceGroupName,
saa_s_azure_subscription_status,
subscriptionId,
subscription_state,
tags,
user_info
FROM azure_isv.newrelic.vw_monitors
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new monitors resource.

/*+ create */
INSERT INTO azure_isv.newrelic.monitors (
monitorName,
resourceGroupName,
subscriptionId,
data__properties,
properties,
identity,
tags,
location
)
SELECT
'{{ monitorName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}',
'{{ identity }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a monitors resource.

/*+ update */
UPDATE azure_isv.newrelic.monitors
SET
identity = '{{ identity }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
monitorName = '{{ monitorName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified monitors resource.

/*+ delete */
DELETE FROM azure_isv.newrelic.monitors
WHERE monitorName = '{{ monitorName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND userEmail = '{{ userEmail }}';