-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from hsinghkalsi/master
Merging changes for AIX and interval enhancement
- Loading branch information
Showing
15 changed files
with
2,107 additions
and
4 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Sample NRQL Queries | ||
|
||
The following are sample NRQL queries that can be used to configure alerts/widgets in dashboards | ||
|
||
***The NRQL queries suggested here only serve as examples, they need to be modified as per deployments** | ||
|
||
|Resource|AIX command|Description|Sample NRQL| | ||
|----|-----|-----|-----| | ||
|CPU Usage|lparstat 1 1|This situation monitors the overall CPU utilization of the server|SELECT average(\`cpu.system\`)from \`unixMonitor:Stats\` FACET hostname | | ||
|File Space Fragmented|df -v -k|This situation monitors for inodes High and file system used Low, then indicates that file space is fragmented for WARNING severity|SELECT average(inodesPercentUsed) FROM \`unixMonitor:Disk\` WHERE mountPoint='/usr' AND hostname='b01avi11810417'| | ||
|File System Percent - All| df -v -k|File System usage|SELECT average(used) FROM \`unixMonitor:Disk\` AND hostname='b01avi11810417'| | ||
|File System Percent - Specified File Systems|df -v -k|This situation monitors all OS-related filesystems on an Unix system with MINOR severity|SELECT average(used) FROM \`unixMonitor:Disk\` WHERE mountPoint = '/opt' AND hostname='b01avi11810417'| | ||
|Inodes Percent|df -v -k|This situation monitors ALL mounted File system's Inodes % used on AIX system for MINOR severity|SELECT average(inodesPercentUsed) FROM `unixMonitor:Disk WHERE hostname='b01avi11810417'| | ||
|Process CPU Usage|ps vewwwg|This situation monitors the CPU percent utilization at 95% by all processes except kproc and swapper for WARNING Severity|SELECT average(cpu) from \`unixMonitor:Process\` WHERE instance NOT LIKE '%kproc%' AND instance NOT LIKE 'swapper' AND hostname='b01avi11810417'| | ||
|Process Missing|ps vewwwg|This situation detects if a critical OS-related process is not running|SELECT uniqueCount(pid) from \`unixMonitor:Process\` WHERE instance='cimserver' AND hostname='b01avi11810417'| | ||
|Process User|ps vewwwg|This situation detects if the MQ ITM agent is running as root|SELECT uniqueCount(pid) from \`unixMonitor:Process\` WHERE instance = 'cimlistener' AND command LIKE '%LOGNAME=root%' AND hostname='b01avi11810417'| | ||
|Swap Percent|svmon -Ounit=KB|This situation monitors swap space availability|select average(\`swap.total\`-\`swap.used\`) as 'Avg Swap.Free' from `unixMonitor:Stats' WHERE hostname='b01avi11810417'| | ||
|Zombie Processes|ps vewwwg|This situation searches for the total amount of zombie processes running|SELECT uniquecount(state) FROM \`unixMonitor:Process\` WHERE state='Z' AND hostname='b01avi11810417'| | ||
|Errpt Errors | errpt |Entries of CLASS Hardware with TYPE of PEND or PERM in errpt or a particular message|SELECT uniqueCount(instance) from \`unixMonitor:Errpt\` where class='S' and type='P' FACET hostname | | ||
|Backup errors| lsmksysb -B| errors encountered during backup| SELECT uniqueCount(\`orignal.date\`) FROM \`unixMonitor:Backup\` WHERE device='/mksysbimg/mksysb.b01avi11810415.aix710.123018' AND command LIKE '%error%' AND hostname='b01avi11810417'| | ||
|Ethernet Channel Errors|entstat 'device'|Monitors for Ethernet Errors|select uniqueCount(instance)from \`unixMonitor:NetworkIO\` WHERE \`receive.errors\` >0 OR \`transmit.errors\`>0 AND hostname='b01avi11810417'| | ||
|File exists|ls -l| checks availability of the configured file |select uniqueCount(\`file.date\`) from \`unixMonitor:File\` WHERE \`file.path\`='/opt/New_Relic/newrelic-unix-monitor/config/plugin.json' FACET hostname | | ||
|||| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
{ | ||
"dashboard": { | ||
"id": 466005, | ||
"title": "Unix - CPU", | ||
"icon": "bar-chart", | ||
"created_at": "2018-01-04T02:54:27Z", | ||
"updated_at": "2018-01-05T02:50:30Z", | ||
"visibility": "all", | ||
"editable": "editable_by_all", | ||
"ui_url": "https://insights.newrelic.com/accounts/284929/dashboards/466005", | ||
"api_url": "https://api.newrelic.com/v2/dashboards/466005", | ||
"owner_email": "seth@newrelic.com", | ||
"metadata": { | ||
"version": 1 | ||
}, | ||
"widgets": [ | ||
{ | ||
"visualization": "facet_table", | ||
"layout": { | ||
"width": 2, | ||
"height": 1, | ||
"row": 1, | ||
"column": 1 | ||
}, | ||
"account_id": 284929, | ||
"data": [ | ||
{ | ||
"nrql": "SELECT latest(`cpu.idle`) as 'Idle', latest(`cpu.iowait`) as 'IOWait', latest(`cpu.system`) as 'System', latest(`cpu.user`) as 'User' from `unixMonitor:Stats` facet hostname since 1 hour ago" | ||
} | ||
], | ||
"presentation": { | ||
"title": "CPU Overview", | ||
"notes": null, | ||
"drilldown_dashboard_id": 466005 | ||
} | ||
}, | ||
{ | ||
"visualization": "line_chart", | ||
"layout": { | ||
"width": 1, | ||
"height": 1, | ||
"row": 1, | ||
"column": 3 | ||
}, | ||
"account_id": 284929, | ||
"data": [ | ||
{ | ||
"nrql": "SELECT average(`cpu.idle`), average(`cpu.iowait`), average(`cpu.system`), average(`cpu.user`) from `unixMonitor:Stats` since 1 hour ago timeseries" | ||
} | ||
], | ||
"presentation": { | ||
"title": "CPU Usage 1H", | ||
"notes": null | ||
} | ||
}, | ||
{ | ||
"visualization": "facet_table", | ||
"layout": { | ||
"width": 2, | ||
"height": 1, | ||
"row": 2, | ||
"column": 1 | ||
}, | ||
"account_id": 284929, | ||
"data": [ | ||
{ | ||
"nrql": "SELECT latest(`loadaverage.1Minute`) as '1 Minute',latest(`loadaverage.5Minute`) as '5 Minute', latest(`loadaverage.15Minute`) as '15 Minute' from `unixMonitor:Stats` since 1 hour ago facet hostname" | ||
} | ||
], | ||
"presentation": { | ||
"title": "Load Averages", | ||
"notes": null, | ||
"drilldown_dashboard_id": 466005 | ||
} | ||
}, | ||
{ | ||
"visualization": "line_chart", | ||
"layout": { | ||
"width": 1, | ||
"height": 1, | ||
"row": 2, | ||
"column": 3 | ||
}, | ||
"account_id": 284929, | ||
"data": [ | ||
{ | ||
"nrql": "SELECT average(`loadaverage.15Minute`),average(`loadaverage.1Minute`),average(`loadaverage.5Minute`) from `unixMonitor:Stats` since 1 hour ago timeseries" | ||
} | ||
], | ||
"presentation": { | ||
"title": "Load Averages 1H", | ||
"notes": null | ||
} | ||
} | ||
], | ||
"filter": { | ||
"event_types": [ | ||
"unixMonitor:Disk", | ||
"unixMonitor:DiskIO", | ||
"unixMonitor:NetworkIO", | ||
"unixMonitor:Process", | ||
"unixMonitor:Stats", | ||
"unixMonitor:Vmstat" | ||
], | ||
"attributes": [ | ||
"agentName", | ||
"hostname", | ||
"instance" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
"dashboard": { | ||
"id": 454498, | ||
"title": "Unix - Disk", | ||
"icon": "bar-chart", | ||
"created_at": "2017-12-07T22:06:18Z", | ||
"updated_at": "2018-01-05T02:12:38Z", | ||
"visibility": "all", | ||
"editable": "editable_by_all", | ||
"ui_url": "https://insights.newrelic.com/accounts/284929/dashboards/454498", | ||
"api_url": "https://api.newrelic.com/v2/dashboards/454498", | ||
"owner_email": "seth@newrelic.com", | ||
"metadata": { | ||
"version": 1 | ||
}, | ||
"widgets": [ | ||
{ | ||
"visualization": "facet_table", | ||
"layout": { | ||
"width": 2, | ||
"height": 1, | ||
"row": 1, | ||
"column": 1 | ||
}, | ||
"account_id": 284929, | ||
"data": [ | ||
{ | ||
"nrql": "SELECT latest(total), latest(used), latest(free), latest(percentUsed) FROM `unixMonitor:Disk` SINCE 1 hour ago facet instance" | ||
} | ||
], | ||
"presentation": { | ||
"title": "Disk Space", | ||
"notes": null, | ||
"drilldown_dashboard_id": 454498 | ||
} | ||
}, | ||
{ | ||
"visualization": "line_chart", | ||
"layout": { | ||
"width": 1, | ||
"height": 1, | ||
"row": 1, | ||
"column": 3 | ||
}, | ||
"account_id": 284929, | ||
"data": [ | ||
{ | ||
"nrql": "SELECT average(total), average(used), average(free) FROM `unixMonitor:Disk` SINCE 1 hour ago timeseries" | ||
} | ||
], | ||
"presentation": { | ||
"title": "Disk Space 1H", | ||
"notes": null | ||
} | ||
}, | ||
{ | ||
"visualization": "event_table", | ||
"layout": { | ||
"width": 3, | ||
"height": 1, | ||
"row": 2, | ||
"column": 1 | ||
}, | ||
"account_id": 284929, | ||
"data": [ | ||
{ | ||
"nrql": "SELECT * FROM `unixMonitor:DiskIO` SINCE 61 seconds ago" | ||
} | ||
], | ||
"presentation": { | ||
"title": "Disk IO Details", | ||
"notes": "'Instance' names here don't necessarily match the ones in \"Disk Space\", as that is looking at mount points." | ||
} | ||
} | ||
], | ||
"filter": { | ||
"event_types": [ | ||
"unixMonitor:Disk", | ||
"unixMonitor:DiskIO", | ||
"unixMonitor:NetworkIO", | ||
"unixMonitor:Process", | ||
"unixMonitor:Stats", | ||
"unixMonitor:Vmstat" | ||
], | ||
"attributes": [ | ||
"agentName", | ||
"hostname", | ||
"instance" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
{ | ||
"dashboard": { | ||
"id": 465694, | ||
"title": "Unix - Memory", | ||
"icon": "bar-chart", | ||
"created_at": "2018-01-03T17:27:56Z", | ||
"updated_at": "2018-01-05T03:54:48Z", | ||
"visibility": "all", | ||
"editable": "editable_by_all", | ||
"ui_url": "https://insights.newrelic.com/accounts/284929/dashboards/465694", | ||
"api_url": "https://api.newrelic.com/v2/dashboards/465694", | ||
"owner_email": "seth@newrelic.com", | ||
"metadata": { | ||
"version": 1 | ||
}, | ||
"widgets": [ | ||
{ | ||
"visualization": "facet_table", | ||
"layout": { | ||
"width": 3, | ||
"height": 1, | ||
"row": 1, | ||
"column": 1 | ||
}, | ||
"account_id": 284929, | ||
"data": [ | ||
{ | ||
"nrql": "SELECT latest(`memory.used`) as 'Used', latest(`memory.free`) as 'Free', latest(`memory.available`) as Available, latest(`memory.pinned`) as 'Pinned', latest(`memory.virtual`) as 'Virtual', latest(`memory.wired`) as 'Wired', latest(`memory.total`) as 'Total' FROM `unixMonitor:Stats` SINCE 1 hour ago facet hostname" | ||
} | ||
], | ||
"presentation": { | ||
"title": "Memory Overview", | ||
"notes": null, | ||
"drilldown_dashboard_id": 465694 | ||
} | ||
}, | ||
{ | ||
"visualization": "line_chart", | ||
"layout": { | ||
"width": 2, | ||
"height": 1, | ||
"row": 2, | ||
"column": 1 | ||
}, | ||
"account_id": 284929, | ||
"data": [ | ||
{ | ||
"nrql": "SELECT average(`memory.free`), average(`memory.used`), average(`memory.total`), average(`memory.available`), average(`memory.virtual`) FROM `unixMonitor:Stats` SINCE 1 hour ago timeseries" | ||
} | ||
], | ||
"presentation": { | ||
"title": "Memory Usage 1H", | ||
"notes": null | ||
} | ||
}, | ||
{ | ||
"visualization": "line_chart", | ||
"layout": { | ||
"width": 1, | ||
"height": 1, | ||
"row": 2, | ||
"column": 3 | ||
}, | ||
"account_id": 284929, | ||
"data": [ | ||
{ | ||
"nrql": "SELECT average(`memory.free`), average(`memory.used`), average(`memory.total`), average(`memory.available`), average(`memory.virtual`) FROM `unixMonitor:Stats` SINCE 1 hour ago timeseries" | ||
} | ||
], | ||
"presentation": { | ||
"title": "Memory Usage 1D", | ||
"notes": null | ||
} | ||
}, | ||
{ | ||
"visualization": "facet_table", | ||
"layout": { | ||
"width": 2, | ||
"height": 1, | ||
"row": 3, | ||
"column": 1 | ||
}, | ||
"account_id": 284929, | ||
"data": [ | ||
{ | ||
"nrql": "SELECT latest(`swap.total`), latest(`swap.used`), latest(`swap.total`)-latest(`swap.used`) as 'swap.free' FROM `unixMonitor:Stats` SINCE 1 hour ago facet hostname" | ||
} | ||
], | ||
"presentation": { | ||
"title": "Swap Overview", | ||
"notes": null, | ||
"drilldown_dashboard_id": 465694 | ||
} | ||
}, | ||
{ | ||
"visualization": "line_chart", | ||
"layout": { | ||
"width": 1, | ||
"height": 1, | ||
"row": 3, | ||
"column": 3 | ||
}, | ||
"account_id": 284929, | ||
"data": [ | ||
{ | ||
"nrql": "SELECT average(`swap.total`), average(`swap.used`), average(`swap.total`-`swap.used`) as 'Avg Swap.Free' from `unixMonitor:Stats` SINCE 1 hour ago timeseries" | ||
} | ||
], | ||
"presentation": { | ||
"title": "Swap Usage 1H", | ||
"notes": null | ||
} | ||
} | ||
], | ||
"filter": { | ||
"event_types": [ | ||
"unixMonitor:Disk", | ||
"unixMonitor:DiskIO", | ||
"unixMonitor:NetworkIO", | ||
"unixMonitor:Process", | ||
"unixMonitor:Stats", | ||
"unixMonitor:Vmstat" | ||
], | ||
"attributes": [ | ||
"agentName", | ||
"hostname", | ||
"instance" | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.