monitors
Creates, updates, deletes, gets or lists a monitors
resource.
Overview
Name | monitors |
Type | Resource |
Id | azure_isv.newrelic.monitors |
Fields
- vw_monitors
- monitors
Name | Datatype | Description |
---|---|---|
account_creation_source | text | field from the properties object |
identity | text | Managed service identity (system assigned and/or user assigned identities) |
liftr_resource_category | text | field from the properties object |
liftr_resource_preference | text | field from the properties object |
location | text | The geo-location where the resource lives |
marketplace_subscription_id | text | field from the properties object |
marketplace_subscription_status | text | field from the properties object |
monitorName | text | field from the properties object |
monitoring_status | text | field from the properties object |
new_relic_account_properties | text | field from the properties object |
org_creation_source | text | field from the properties object |
plan_data | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
saa_s_azure_subscription_status | text | field from the properties object |
subscriptionId | text | field from the properties object |
subscription_state | text | field from the properties object |
tags | text | Resource tags. |
user_info | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
identity | object | Managed service identity (system assigned and/or user assigned identities) |
location | string | The geo-location where the resource lives |
properties | object | Properties specific to the NewRelic Monitor resource |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | monitorName, resourceGroupName, subscriptionId | Get a NewRelicMonitorResource |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | List NewRelicMonitorResource resources by resource group |
list_by_subscription | SELECT | subscriptionId | List NewRelicMonitorResource resources by subscription ID |
create_or_update | INSERT | monitorName, resourceGroupName, subscriptionId, data__properties | Create a NewRelicMonitorResource |
delete | DELETE | monitorName, resourceGroupName, subscriptionId, userEmail | Delete a NewRelicMonitorResource |
update | UPDATE | monitorName, resourceGroupName, subscriptionId | Update a NewRelicMonitorResource |
refresh_ingestion_key | EXEC | monitorName, resourceGroupName, subscriptionId | Refreshes the ingestion key for all monitors linked to the same account associated to this monitor. |
resubscribe | EXEC | monitorName, resourceGroupName, subscriptionId | |
switch_billing | EXEC | monitorName, resourceGroupName, subscriptionId, data__userEmail | Switches the billing for NewRelic monitor resource. |
vm_host_payload | EXEC | monitorName, resourceGroupName, subscriptionId | Returns 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
- vw_monitors
- monitors
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 }}';
SELECT
identity,
location,
properties,
tags
FROM azure_isv.newrelic.monitors
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new monitors
resource.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: provisioningState
value: []
- name: monitoringStatus
value: []
- name: marketplaceSubscriptionStatus
value: []
- name: marketplaceSubscriptionId
value: string
- name: newRelicAccountProperties
value:
- name: userId
value: string
- name: accountInfo
value:
- name: accountId
value: string
- name: ingestionKey
value: []
- name: region
value: string
- name: organizationInfo
value:
- name: organizationId
value: string
- name: singleSignOnProperties
value:
- name: singleSignOnState
value: []
- name: enterpriseAppId
value: string
- name: singleSignOnUrl
value: string
- name: userInfo
value:
- name: firstName
value: string
- name: lastName
value: string
- name: emailAddress
value: []
- name: phoneNumber
value: string
- name: country
value: string
- name: planData
value:
- name: usageType
value: []
- name: billingCycle
value: string
- name: planDetails
value: string
- name: effectiveDate
value: string
- name: liftrResourceCategory
value: []
- name: liftrResourcePreference
value: integer
- name: orgCreationSource
value: []
- name: accountCreationSource
value: []
- name: subscriptionState
value: string
- name: saaSAzureSubscriptionStatus
value: string
- name: identity
value:
- name: principalId
value: string
- name: tenantId
value: string
- name: type
value: []
- name: userAssignedIdentities
value: []
- name: tags
value: object
- name: location
value: string
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 }}';