-
Notifications
You must be signed in to change notification settings - Fork 3
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 #44 from f5devcentral/1.3
1.3
- Loading branch information
Showing
39 changed files
with
14,268 additions
and
44,907 deletions.
There are no files selected for viewing
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
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
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
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,34 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"files.exclude": { | ||
"out": false // set this to true to hide the "out" folder with the compiled JS files | ||
}, | ||
"search.exclude": { | ||
"out": true // set this to false to include "out" folder in search results | ||
}, | ||
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts | ||
"typescript.tsc.autoDetect": "off", | ||
"peacock.color": "#614b46", | ||
"workbench.colorCustomizations": { | ||
"activityBar.activeBackground": "#026e5f", | ||
"activityBar.activeBorder": "#e762fc", | ||
"activityBar.background": "#026e5f", | ||
"activityBar.foreground": "#e7e7e7", | ||
"activityBar.inactiveForeground": "#e7e7e799", | ||
"activityBarBadge.background": "#e762fc", | ||
"activityBarBadge.foreground": "#15202b", | ||
"statusBar.background": "#013c34", | ||
"statusBar.foreground": "#e7e7e7", | ||
"statusBarItem.hoverBackground": "#026e5f", | ||
"titleBar.activeBackground": "#013c34", | ||
"titleBar.activeForeground": "#e7e7e7", | ||
"titleBar.inactiveBackground": "#013c3499", | ||
"titleBar.inactiveForeground": "#e7e7e799", | ||
"sash.hoverBorder": "#026e5f", | ||
"statusBarItem.remoteBackground": "#013c34", | ||
"statusBarItem.remoteForeground": "#e7e7e7", | ||
"commandCenter.border": "#e7e7e799" | ||
}, | ||
"peacock.remoteColor": "#013c34", | ||
"livePreview.defaultPreviewPath": "/report1.html" | ||
} |
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
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,84 @@ | ||
|
||
# Ranking | ||
|
||
|
||
|
||
stat_module.xml | ||
|
||
## notes | ||
|
||
|
||
```bash | ||
[ | ||
'virtual_server_stat', // general vs stats | ||
'virtual_server_cpu_stat', // vs cpu stats | ||
'gtm_wideip_stat', // gtm wideip stats | ||
'profile_clientssl_stat', | ||
'plane_cpu_stat', | ||
'rule_stat', | ||
'asm_cpu_util_stats', | ||
'asm_learning_suggestions_stats', | ||
'asm_enforced_entities_stats', | ||
] | ||
``` | ||
|
||
## Ranking system | ||
|
||
Top N = 10 | ||
key = virtual server name | ||
|
||
```yaml | ||
virtual_server_stat: | ||
- clientside.pkts_in | ||
- clientside.bytes_in | ||
- clientside.pkts_out | ||
- clientside.bytes_out | ||
- clientside.max_conns | ||
- clientside.tot_conns | ||
- clientside.cur_conns | ||
``` | ||
Step 1: Sort/Collect top 10 VS from each of the seven stats above | ||
- Each VS will be scored; 10 for #1, 9 for #2, and 1 for #10 (last) | ||
- Every item in each top list gets a score just for getting on the list | ||
Step 2: Collect Scores | ||
- Create new table adding up the scores to produce a rank | ||
- third column providing reasons for rank | ||
- [[clientside.pkts_in, 6], [clientside.bytes_in, 5], [clientside.max_conns, 1], [clientside.tot_conns, 2]] | ||
### virtual_server_stat | ||
```json | ||
{ | ||
columns: [ | ||
{id: 'name', name: 'Name'}, | ||
{id: 'clientside.pkts_in', name: 'Packets In'}, | ||
{id: 'clientside.bytes_in', name: 'Bytes In'}, | ||
{id: 'clientside.pkts_out', name: 'Packets Out'}, | ||
{id: 'clientside.bytes_out', name: 'Bytes Out'}, | ||
{id: 'clientside.max_conns', name: 'Max Connections'}, | ||
{id: 'clientside.tot_conns', name: 'Total Connections'}, | ||
{id: 'clientside.cur_conns', name: 'Current Connections'}, | ||
], | ||
search: true, | ||
sort: true, | ||
data: Object.values(data.virtual_server_stat) | ||
} | ||
``` | ||
|
||
|
||
### virtual_server_cpu_stat | ||
|
||
```json | ||
{ | ||
columns: [ | ||
{id: 'name', name: 'Name'}, | ||
{id: 'avg_5sec', name: 'Average - 5 sec'}, | ||
{id: 'avg_1min', name: 'Average - 1 min'}, | ||
{id: 'avg_5min', name: 'Average - 5 min'} | ||
], | ||
search: true, | ||
sort: true, | ||
data: Object.values(data.virtual_server_cpu_stat) | ||
} | ||
``` |
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,62 @@ | ||
### co-pilot irules examples | ||
|
||
# create an irule to redirect http to https | ||
cat <<EOF > /config/http_to_https_redirect.irule | ||
when HTTP_REQUEST { | ||
HTTP::respond 301 Location "https://[getfield [HTTP::host] : 1][HTTP::uri]" | ||
} | ||
|
||
|
||
# create an irule to filter based on source ip, use a data group to store the ip addresses | ||
cat <<EOF > /config/ip_filter.irule | ||
when HTTP_REQUEST { | ||
if { [class match [IP::client_addr] equals ip_filter] } { | ||
HTTP::respond 403 content "Access Denied" | ||
} | ||
} | ||
|
||
|
||
# create an irule to direct traffic to a pool based on the host header | ||
cat <<EOF > /config/host_pool.irule | ||
when HTTP_REQUEST { | ||
|
||
# log the host header and source ip and uri | ||
log local0. "host: [HTTP::host] ip: [IP::client_addr] uri: [HTTP::uri]" | ||
|
||
if { [HTTP::host] equals "www.example.com" } { | ||
pool www.example.com | ||
} | ||
elseif { [HTTP::host] equals "www.example2.com" } { | ||
pool www.example2.com | ||
} | ||
else { | ||
pool www.example.com | ||
} | ||
} | ||
|
||
# create an irule to log all client and server side connections details | ||
cat <<EOF > /config/connection_logging.irule | ||
when CLIENT_ACCEPTED { | ||
log local0. "client accepted: [IP::client_addr]:[TCP::client_port]" | ||
} | ||
|
||
when CLIENT_CLOSED { | ||
log local0. "client closed: [IP::client_addr]:[TCP::client_port]" | ||
} | ||
|
||
when SERVER_CONNECTED { | ||
log local0. "server connected: [IP::server_addr]:[TCP::server_port]" | ||
} | ||
|
||
when SERVER_CLOSED { | ||
log local0. "server closed: [IP::server_addr]:[TCP::server_port]" | ||
} | ||
|
||
when HTTP_REQUEST { | ||
log local0. "http request: [IP::client_addr]:[TCP::client_port] -> [IP::server_addr]:[TCP::server_port] [HTTP::method] [HTTP::host][HTTP::uri]" | ||
} | ||
|
||
when HTTP_RESPONSE { | ||
log local0. "http response: [IP::server_addr]:[TCP::server_port] -> [IP::client_addr]:[TCP::client_port] [HTTP::status] [HTTP::reason]" | ||
} | ||
|
Oops, something went wrong.