Skip to content

Commit 2727cdd

Browse files
authored
Merge pull request #44 from f5devcentral/1.3
1.3
2 parents 76d85eb + b671d04 commit 2727cdd

39 files changed

+14268
-44907
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ jobs:
4646
- name: get extension version
4747
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
4848

49+
- name: build test qkview
50+
run: echo "QKVIEW=$(npx ts-node src/makeQkview.ts)" >> $GITHUB_ENV
51+
4952
# https://github.com/marketplace/actions/changelog-reader
5053
- name: Get Changelog Entry
5154
id: changelog_reader
@@ -69,7 +72,7 @@ jobs:
6972
tag: v${{ env.PACKAGE_VERSION }}
7073
name: ${{ env.PACKAGE_NAME }}
7174
body: "${{ steps.changelog_reader.outputs.changes }}"
72-
artifacts: ${{ env.PACKAGE_NAME }}
75+
artifacts: ${{ env.PACKAGE_NAME }},${{ env.QKVIEW }}
7376
draft: false
7477
prerelease: false
7578

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ tmp_*
1616
*AppDataRoamingnpm
1717
# private folder for tests
1818
/private/
19-
settings.json
2019
*.ucs
2120
*.qkview
2221
# exclude the xml to json stats output

.vscode/launch.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"name": "Debug current test",
99
"type": "node",
1010
"request": "launch",
11-
"runtimeVersion": "16.20.0",
1211
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
1312
"args": [
1413
"-r",
@@ -19,6 +18,18 @@
1918
],
2019
"internalConsoleOptions": "neverOpen",
2120
},
21+
{
22+
"type": "chrome",
23+
"request": "launch",
24+
"name": "Launch report1.html",
25+
"file": "${workspaceFolder}/report1.html"
26+
},
27+
{
28+
"type": "chrome",
29+
"request": "launch",
30+
"name": "Launch 2report1.html",
31+
"url": "http://127.0.0.1:3000/report1.html"
32+
},
2233
{
2334
"type": "node",
2435
"request": "launch",

.vscode/settings.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"files.exclude": {
4+
"out": false // set this to true to hide the "out" folder with the compiled JS files
5+
},
6+
"search.exclude": {
7+
"out": true // set this to false to include "out" folder in search results
8+
},
9+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10+
"typescript.tsc.autoDetect": "off",
11+
"peacock.color": "#614b46",
12+
"workbench.colorCustomizations": {
13+
"activityBar.activeBackground": "#026e5f",
14+
"activityBar.activeBorder": "#e762fc",
15+
"activityBar.background": "#026e5f",
16+
"activityBar.foreground": "#e7e7e7",
17+
"activityBar.inactiveForeground": "#e7e7e799",
18+
"activityBarBadge.background": "#e762fc",
19+
"activityBarBadge.foreground": "#15202b",
20+
"statusBar.background": "#013c34",
21+
"statusBar.foreground": "#e7e7e7",
22+
"statusBarItem.hoverBackground": "#026e5f",
23+
"titleBar.activeBackground": "#013c34",
24+
"titleBar.activeForeground": "#e7e7e7",
25+
"titleBar.inactiveBackground": "#013c3499",
26+
"titleBar.inactiveForeground": "#e7e7e799",
27+
"sash.hoverBorder": "#026e5f",
28+
"statusBarItem.remoteBackground": "#013c34",
29+
"statusBarItem.remoteForeground": "#e7e7e7",
30+
"commandCenter.border": "#e7e7e799"
31+
},
32+
"peacock.remoteColor": "#013c34",
33+
"livePreview.defaultPreviewPath": "/report1.html"
34+
}

CHANGELOG.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,39 @@ All notable changes to the corkscrew rpm will be documented in this file.
77

88
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
99

10+
---
11+
1012
## [Unreleased]
1113

1214
### Added
1315

16+
- [RFE] dig ssl profiles and cipher groups #43 (pending/researching)
17+
1418
### Changed
1519

16-
- [RFE] include xml stats in extraction #15 (researching)
17-
- main README.md/documentation updates
20+
- main README.md/documentation updates (pending)
1821

1922
### Fixed
2023

2124

25+
26+
---
27+
28+
## [1.3.0] - (07.11.2023)
29+
30+
### Added
31+
32+
- generate and add test qkview to releases for consumption in vscode-f5 extension
33+
- [RFE] include xml stats in extraction #15
34+
- initial xml stats rank system to show top 10 VS and GSLB
35+
- includes other stats for irule, asm and some lists of objects that have no stats
36+
- initial report builder (html report) testing/dev
37+
- full license parsing
38+
39+
### Fixed
40+
41+
- added more catch statements to prevent errors (and log them) from total failures
42+
2243
---
2344

2445
## [1.2.0] - (06.19.2023)
@@ -32,14 +53,14 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
3253

3354
## [1.1.3] - (05.25.2023)
3455

35-
### Changed
56+
### Fixed
3657

3758
- [BUG] more snatpool abstraction bug/tweaks
3859
- log error when app abstraction encounters error
3960

4061
## [1.1.2] - (05.25.2023)
4162

42-
### Changed
63+
### Fixed
4364

4465
- [BUG] snatpool abstraction broken #36
4566

RANKING.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
2+
# Ranking
3+
4+
5+
6+
stat_module.xml
7+
8+
## notes
9+
10+
11+
```bash
12+
[
13+
'virtual_server_stat', // general vs stats
14+
'virtual_server_cpu_stat', // vs cpu stats
15+
'gtm_wideip_stat', // gtm wideip stats
16+
'profile_clientssl_stat',
17+
'plane_cpu_stat',
18+
'rule_stat',
19+
'asm_cpu_util_stats',
20+
'asm_learning_suggestions_stats',
21+
'asm_enforced_entities_stats',
22+
]
23+
```
24+
25+
## Ranking system
26+
27+
Top N = 10
28+
key = virtual server name
29+
30+
```yaml
31+
virtual_server_stat:
32+
- clientside.pkts_in
33+
- clientside.bytes_in
34+
- clientside.pkts_out
35+
- clientside.bytes_out
36+
- clientside.max_conns
37+
- clientside.tot_conns
38+
- clientside.cur_conns
39+
```
40+
41+
Step 1: Sort/Collect top 10 VS from each of the seven stats above
42+
- Each VS will be scored; 10 for #1, 9 for #2, and 1 for #10 (last)
43+
- Every item in each top list gets a score just for getting on the list
44+
Step 2: Collect Scores
45+
- Create new table adding up the scores to produce a rank
46+
- third column providing reasons for rank
47+
- [[clientside.pkts_in, 6], [clientside.bytes_in, 5], [clientside.max_conns, 1], [clientside.tot_conns, 2]]
48+
49+
### virtual_server_stat
50+
51+
```json
52+
{
53+
columns: [
54+
{id: 'name', name: 'Name'},
55+
{id: 'clientside.pkts_in', name: 'Packets In'},
56+
{id: 'clientside.bytes_in', name: 'Bytes In'},
57+
{id: 'clientside.pkts_out', name: 'Packets Out'},
58+
{id: 'clientside.bytes_out', name: 'Bytes Out'},
59+
{id: 'clientside.max_conns', name: 'Max Connections'},
60+
{id: 'clientside.tot_conns', name: 'Total Connections'},
61+
{id: 'clientside.cur_conns', name: 'Current Connections'},
62+
],
63+
search: true,
64+
sort: true,
65+
data: Object.values(data.virtual_server_stat)
66+
}
67+
```
68+
69+
70+
### virtual_server_cpu_stat
71+
72+
```json
73+
{
74+
columns: [
75+
{id: 'name', name: 'Name'},
76+
{id: 'avg_5sec', name: 'Average - 5 sec'},
77+
{id: 'avg_1min', name: 'Average - 1 min'},
78+
{id: 'avg_5min', name: 'Average - 5 min'}
79+
],
80+
search: true,
81+
sort: true,
82+
data: Object.values(data.virtual_server_cpu_stat)
83+
}
84+
```

co-pilot_irules_examples.irul

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
### co-pilot irules examples
2+
3+
# create an irule to redirect http to https
4+
cat <<EOF > /config/http_to_https_redirect.irule
5+
when HTTP_REQUEST {
6+
HTTP::respond 301 Location "https://[getfield [HTTP::host] : 1][HTTP::uri]"
7+
}
8+
9+
10+
# create an irule to filter based on source ip, use a data group to store the ip addresses
11+
cat <<EOF > /config/ip_filter.irule
12+
when HTTP_REQUEST {
13+
if { [class match [IP::client_addr] equals ip_filter] } {
14+
HTTP::respond 403 content "Access Denied"
15+
}
16+
}
17+
18+
19+
# create an irule to direct traffic to a pool based on the host header
20+
cat <<EOF > /config/host_pool.irule
21+
when HTTP_REQUEST {
22+
23+
# log the host header and source ip and uri
24+
log local0. "host: [HTTP::host] ip: [IP::client_addr] uri: [HTTP::uri]"
25+
26+
if { [HTTP::host] equals "www.example.com" } {
27+
pool www.example.com
28+
}
29+
elseif { [HTTP::host] equals "www.example2.com" } {
30+
pool www.example2.com
31+
}
32+
else {
33+
pool www.example.com
34+
}
35+
}
36+
37+
# create an irule to log all client and server side connections details
38+
cat <<EOF > /config/connection_logging.irule
39+
when CLIENT_ACCEPTED {
40+
log local0. "client accepted: [IP::client_addr]:[TCP::client_port]"
41+
}
42+
43+
when CLIENT_CLOSED {
44+
log local0. "client closed: [IP::client_addr]:[TCP::client_port]"
45+
}
46+
47+
when SERVER_CONNECTED {
48+
log local0. "server connected: [IP::server_addr]:[TCP::server_port]"
49+
}
50+
51+
when SERVER_CLOSED {
52+
log local0. "server closed: [IP::server_addr]:[TCP::server_port]"
53+
}
54+
55+
when HTTP_REQUEST {
56+
log local0. "http request: [IP::client_addr]:[TCP::client_port] -> [IP::server_addr]:[TCP::server_port] [HTTP::method] [HTTP::host][HTTP::uri]"
57+
}
58+
59+
when HTTP_RESPONSE {
60+
log local0. "http response: [IP::server_addr]:[TCP::server_port] -> [IP::client_addr]:[TCP::client_port] [HTTP::status] [HTTP::reason]"
61+
}
62+

0 commit comments

Comments
 (0)