Skip to content

Commit cd728bc

Browse files
abhishurainamuruganishekar
authored andcommitted
Add nginx relationship (#2502)
* Update windows service rule * update summary metric
1 parent 2ea8a11 commit cd728bc

File tree

4 files changed

+85
-52
lines changed

4 files changed

+85
-52
lines changed

entity-types/infra-elasticsearchcluster/golden_metrics.stg.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ clusterUnassignedShard:
8383
where: state='unassigned'
8484
eventId: entity.guid
8585
eventName: entity.name
86+
newRelic:
87+
select: average(shards.unassigned)
88+
from: ElasticsearchClusterSample
89+
eventId: entityGuid
90+
eventName: entityName
8691
clusterPendingTask:
8792
title: Cluster Pending Task
8893
queries:

entity-types/infra-elasticsearchcluster/newrelic_dashboard.stg.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
"nrqlQueries": [
2222
{
2323
"accountId": 0,
24-
"query": "FROM ElasticsearchClusterSample SELECT latest(cluster.status)"
24+
"query": "FROM ElasticsearchClusterSample SELECT latest(cluster.status) as Status"
2525
}
2626
]
2727
}
2828
},
2929
{
3030
"title": "Node count",
3131
"layout": {
32-
"column": 9,
32+
"column": 5,
3333
"row": 1,
3434
"width": 4,
3535
"height": 3
@@ -41,16 +41,16 @@
4141
"nrqlQueries": [
4242
{
4343
"accountId": 0,
44-
"query": "SELECT \n latest(cluster.nodes) AS 'Total Nodes', \n latest(cluster.dataNodes) AS 'Data Nodes' \nFROM ElasticsearchClusterSample"
44+
"query": "SELECT \nlatest(cluster.nodes) AS 'Total Nodes', \nlatest(cluster.dataNodes) AS 'Data Nodes' \nFROM ElasticsearchClusterSample"
4545
}
4646
]
4747
}
4848
},
4949
{
5050
"title": "Shards",
5151
"layout": {
52-
"column": 1,
53-
"row": 4,
52+
"column": 9,
53+
"row": 1,
5454
"width": 4,
5555
"height": 3
5656
},
@@ -61,7 +61,7 @@
6161
"nrqlQueries": [
6262
{
6363
"accountId": 0,
64-
"query": "FROM ElasticsearchClusterSample \n SELECT latest(shards.active) as 'Active Shards', latest(shards.initializing) as 'Initializing Shards', atest(shards.primaryActive) as 'Primary Active Shards, latest(shards.relocating) as 'Relocating Shards', latest(shards.unassigned) as 'Unassigned Shards', latest(shards.active + shards.initializing + shards.primaryActive + shards.relocating + shards.unassigned ) as 'Total shards'"
64+
"query": "FROM ElasticsearchClusterSample \nSELECT latest(shards.active) as 'Active Shards',\nlatest(shards.initializing) as 'Initializing Shards',\nlatest(shards.primaryActive) as 'Primary Active Shards',\nlatest(shards.relocating) as 'Relocating Shards',\nlatest(shards.unassigned) as 'Unassigned Shards',\nlatest(shards.active + shards.initializing + shards.primaryActive + shards.relocating + shards.unassigned ) as 'Total shards'\nTIMESERIES"
6565
}
6666
]
6767
}

relationships/synthesis/INFRA-HOST-to-INFRA-NGINXSERVER.stg.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,71 @@ relationships:
6767
attribute: entity.guid
6868
entityType:
6969
value: NGINXSERVER
70+
71+
- name: infrahostHostsNginxServer
72+
version: "1"
73+
origins:
74+
- OnHost Integration
75+
conditions:
76+
- attribute: eventType
77+
anyOf: [ "NginxSample" ]
78+
- attribute: nr.entityType
79+
anyOf: ["NGINXServer","NGINXSERVER"]
80+
- attribute: reportingAgent
81+
present: true
82+
relationship:
83+
expires: PT75M
84+
relationshipType: HOSTS
85+
source:
86+
buildGuid:
87+
account:
88+
attribute: accountId
89+
domain:
90+
value: INFRA
91+
type:
92+
value: HOST
93+
valueInGuid: NA
94+
identifier:
95+
fragments:
96+
- attribute: reportingAgent # cloudproviderID
97+
hashAlgorithm: FARM_HASH
98+
target:
99+
extractGuid:
100+
attribute: entityGuid
101+
entityType:
102+
value: NGINXServer
103+
104+
- name: infrahostHostsNginxServerrule2
105+
version: "1"
106+
origins:
107+
- OnHost Integration
108+
conditions:
109+
- attribute: eventType
110+
anyOf: [ "NginxSample" ]
111+
- attribute: nr.entityType
112+
anyOf: ["NGINXServer","NGINXSERVER"]
113+
- attribute: fullHostname
114+
present: true
115+
- attribute: reportingAgent
116+
present: false
117+
relationship:
118+
expires: PT75M
119+
relationshipType: HOSTS
120+
source:
121+
buildGuid:
122+
account:
123+
attribute: accountId
124+
domain:
125+
value: INFRA
126+
type:
127+
value: HOST
128+
valueInGuid: NA
129+
identifier:
130+
fragments:
131+
- attribute: fullHostname
132+
hashAlgorithm: FARM_HASH
133+
target:
134+
extractGuid:
135+
attribute: entityGuid
136+
entityType:
137+
value: NGINXServer

relationships/synthesis/INFRA-HOST-to-INFRA-WIN_SERVICE.stg.yml

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,57 +6,17 @@ relationships:
66
conditions:
77
- attribute: entity.type
88
anyOf: ["WIN_SERVICE"]
9-
- attribute: reportingAgent
9+
- attribute: hostname
1010
present: true
1111
relationship:
1212
expires: PT75M
1313
relationshipType: HOSTS
1414
source:
15-
buildGuid:
16-
account:
17-
attribute: accountId
18-
domain:
19-
value: INFRA
20-
type:
21-
value: HOST
22-
valueInGuid: NA
23-
identifier:
24-
fragments:
25-
- attribute: reportingAgent # cloudproviderID
26-
hashAlgorithm: FARM_HASH
27-
target:
28-
extractGuid:
29-
attribute: entity.guid
30-
entityType:
31-
value: WIN_SERVICE
32-
33-
- name: hostHostsWinserviceRule2
34-
version: "1"
35-
origins:
36-
- OnHost Integration
37-
conditions:
38-
- attribute: entity.type
39-
anyOf: ["WIN_SERVICE"]
40-
- attribute: fullHostname
41-
present: true
42-
- attribute: reportingAgent
43-
present: false
44-
relationship:
45-
expires: PT75M
46-
relationshipType: HOSTS
47-
source:
48-
buildGuid:
49-
account:
50-
attribute: accountId
51-
domain:
52-
value: INFRA
53-
type:
54-
value: HOST
55-
valueInGuid: NA
56-
identifier:
57-
fragments:
58-
- attribute: fullHostname
59-
hashAlgorithm: FARM_HASH
15+
lookupGuid:
16+
candidateCategory: HOST
17+
fields:
18+
- field: onHostEntityHostname
19+
attribute: hostname
6020
target:
6121
extractGuid:
6222
attribute: entity.guid

0 commit comments

Comments
 (0)