Skip to main content

monitors

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

Overview

Namemonitors
TypeResource
Idazure_isv.newrelicobservability.monitors

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
accountCreationSourcestringSource of account creation. Known values are: "LIFTR" and "NEWRELIC".
identityobjectThe managed service identities assigned to this resource.
liftrResourceCategorystringLiftr resource category. Known values are: "Unknown" and "MonitorLogs".
liftrResourcePreferenceintegerLiftr resource preference. The priority of the resource.
locationstringThe geo-location where the resource lives. Required.
marketplaceSubscriptionIdstringMarketplace Subscription Id.
marketplaceSubscriptionStatusstringNewRelic Organization properties of the resource. Known values are: "Active" and "Suspended".
monitoringStatusstringMonitoringStatus of the resource. Known values are: "Enabled" and "Disabled".
newRelicAccountPropertiesobjectMarketplaceSubscriptionStatus of the resource.
orgCreationSourcestringSource of org creation. Known values are: "LIFTR" and "NEWRELIC".
planDataobjectPlan details.
provisioningStatestringProvisioning State of the resource. Known values are: "Accepted", "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled", "Deleted", and "NotSpecified".
saaSAzureSubscriptionStatusstringStatus of Azure Subscription where Marketplace SaaS is located.
saaSDataobjectSaaS details.
subscriptionStatestringState of the Azure Subscription containing the monitor resource.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
userInfoobjectUser Info.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, monitor_name, subscription_idRetrieves the properties and configuration details of a specific New Relic monitor resource, providing insight into its setup and status.
list_by_resource_groupselectresource_group_name, subscription_idRetrieves a list of all New Relic monitor resources either a specific resource group.
list_by_subscriptionselectsubscription_idLists all New Relic monitor resources either within a specific subscription.
create_or_updateinsertresource_group_name, monitor_name, subscription_id, locationCreates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the integration between Azure and your New Relic account, enabling observability and monitoring of your Azure resources through New Relic.
updateupdateresource_group_name, monitor_name, subscription_idUpdates an existing New Relic monitor resource from your Azure subscription.
create_or_updatereplaceresource_group_name, monitor_name, subscription_id, locationCreates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the integration between Azure and your New Relic account, enabling observability and monitoring of your Azure resources through New Relic.
deletedeleteresource_group_name, monitor_name, subscription_id, userEmailDeletes an existing New Relic monitor resource from your Azure subscription, removing the integration and stopping the observability of your Azure resources through New Relic.
list_app_servicesexecresource_group_name, monitor_name, subscription_id, userEmailLists the app service resources currently being monitored by the New Relic resource, helping you understand which app services are under monitoring.
list_hostsexecresource_group_name, monitor_name, subscription_id, userEmailLists all VM resources currently being monitored by the New Relic monitor resource, helping you manage observability.
list_monitored_resourcesexecresource_group_name, monitor_name, subscription_idLists all Azure resources that are currently being monitored by the specified New Relic monitor resource, providing insight into the coverage of your observability setup.
list_linked_resourcesexecresource_group_name, monitor_name, subscription_idLists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, helping you understand the scope of integration. Lists all Azure resources that are linked to the same New Relic organization as the specified monitor resource, helping you understand the scope of integration.
get_metric_rulesexecresource_group_name, monitor_name, subscription_id, userEmailRetrieves the metric rules that are configured in the New Relic monitor resource.
get_metric_statusexecresource_group_name, monitor_name, subscription_id, userEmailRetrieves the metric status that are configured in the New Relic monitor resource.
switch_billingexecresource_group_name, monitor_name, subscription_id, userEmailSwitches the billing for the New Relic Monitor resource to be billed by Azure Marketplace.
refresh_ingestion_keyexecresource_group_name, monitor_name, subscription_idRefreshes the ingestion key for all monitors linked to the same account associated to the underlying monitor.
vm_host_payloadexecresource_group_name, monitor_name, subscription_idReturns the payload that needs to be passed in the request body for installing the New Relic agent on a VM, providing the necessary configuration details.
latest_linked_saa_sexecresource_group_name, monitor_name, subscription_idReturns the latest SaaS linked to the newrelic organization of the underlying monitor.
link_saa_sexecresource_group_name, monitor_name, subscription_idLinks a new SaaS to the newrelic organization of the underlying monitor. Links a new SaaS to the newrelic organization of the underlying monitor.
resubscribeexecresource_group_name, monitor_name, subscription_idResubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace. Resubscribes the New Relic Organization of the underline Monitor Resource to be billed by Azure Marketplace.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
monitor_namestringMonitor resource name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
userEmailstringUser Email. Required.

SELECT examples

Retrieves the properties and configuration details of a specific New Relic monitor resource, providing insight into its setup and status.

SELECT
id,
name,
accountCreationSource,
identity,
liftrResourceCategory,
liftrResourcePreference,
location,
marketplaceSubscriptionId,
marketplaceSubscriptionStatus,
monitoringStatus,
newRelicAccountProperties,
orgCreationSource,
planData,
provisioningState,
saaSAzureSubscriptionStatus,
saaSData,
subscriptionState,
systemData,
tags,
type,
userInfo
FROM azure_isv.newrelicobservability.monitors
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND monitor_name = '{{ monitor_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the integration between Azure and your New Relic account, enabling observability and monitoring of your Azure resources through New Relic.

INSERT INTO azure_isv.newrelicobservability.monitors (
tags,
location,
identity,
properties,
resource_group_name,
monitor_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ identity }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ monitor_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates an existing New Relic monitor resource from your Azure subscription.

UPDATE azure_isv.newrelicobservability.monitors
SET
identity = '{{ identity }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND monitor_name = '{{ monitor_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Creates a new or updates an existing New Relic monitor resource in your Azure subscription. This sets up the integration between Azure and your New Relic account, enabling observability and monitoring of your Azure resources through New Relic.

REPLACE azure_isv.newrelicobservability.monitors
SET
tags = '{{ tags }}',
location = '{{ location }}',
identity = '{{ identity }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND monitor_name = '{{ monitor_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes an existing New Relic monitor resource from your Azure subscription, removing the integration and stopping the observability of your Azure resources through New Relic.

DELETE FROM azure_isv.newrelicobservability.monitors
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND monitor_name = '{{ monitor_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND userEmail = '{{ userEmail }}' --required
;

Lifecycle Methods

Lists the app service resources currently being monitored by the New Relic resource, helping you understand which app services are under monitoring.

EXEC azure_isv.newrelicobservability.monitors.list_app_services 
@resource_group_name='{{ resource_group_name }}' --required,
@monitor_name='{{ monitor_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"azureResourceIds": "{{ azureResourceIds }}",
"userEmail": "{{ userEmail }}"
}'
;