Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Citrix ADC] Add Integration Package with Service Data Stream #4364

Merged
merged 10 commits into from
Nov 22, 2022
12 changes: 10 additions & 2 deletions packages/citrix_adc/_dev/build/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

The Citrix ADC integration allows you to monitor your Citrix ADC instance. Citrix ADC is an application delivery controller that performs application-specific traffic analysis to intelligently distribute, optimize, and secure Layer 4 - Layer 7 (L4–L7) network traffic for web applications.

Use the Citrix ADC integration to collect metrics related to the interface. Then visualize that data in Kibana, create alerts to notify you if something goes wrong, and reference logs when troubleshooting an issue.
Use the Citrix ADC integration to collect metrics related to the interface and service. Then visualize that data in Kibana, create alerts to notify you if something goes wrong, and reference logs when troubleshooting an issue.

## Data streams

The Citrix ADC integration collects metrics data.

Metrics give you insight into the statistics of the Citrix ADC. Metrics data streams collected by the Citrix ADC integration include [interface](https://developer-docs.citrix.com/projects/netscaler-nitro-api/en/12.0/statistics/network/interface/), so that the user could monitor and troubleshoot the performance of the Citrix ADC instances.
Metrics give you insight into the statistics of the Citrix ADC. Metrics data streams collected by the Citrix ADC integration include [interface](https://developer-docs.citrix.com/projects/netscaler-nitro-api/en/12.0/statistics/network/interface/) and [service](https://developer-docs.citrix.com/projects/netscaler-nitro-api/en/12.0/statistics/basic/service/), so that the user could monitor and troubleshoot the performance of the Citrix ADC instances.

Note:
- Users can monitor and see the metrics inside the ingested documents for Citrix ADC in the logs-* index pattern from `Discover`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be metrics-* and not logs-* index pattern.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using httpjson filebeat input. So user can see all the indices in logs-* format in Kibana Discover.

Expand Down Expand Up @@ -38,3 +38,11 @@ This is the `interface` data stream. The Citrix ADC interfaces are numbered in s
{{event "interface"}}

{{fields "interface"}}

### Service

This is the `service` data stream. With the help of the service endpoint, metrics like throughput, client-server connections, request bytes can be collected along with other statistics for Service resources.

{{event "service"}}

{{fields "service"}}
Empty file modified packages/citrix_adc/_dev/deploy/docker/docker-compose.yml
100755 → 100644
Empty file.
6 changes: 6 additions & 0 deletions packages/citrix_adc/_dev/deploy/docker/files/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ rules:
- status_code: 200
body: |-
{"errorcode":0,"message":"Done","severity":"NONE","Interface":[{"id":"0/1","curintfstate":"UP","curlinkuptime":"4.06:45:16","curlinkdowntime":"00:00:11","totrxbytes":"1103884064","rxbytesrate":4603,"tottxbytes":"776571619","txbytesrate":1924,"totrxpkts":"5396347","rxpktsrate":38,"tottxpkts":"2511171","txpktsrate":5,"jumbopktsreceived":"0","jumbopktsreceivedrate":0,"jumbopktstransmitted":"0","jumbopktstransmittedrate":0,"trunkpktsreceived":"0","trunkpktsreceivedrate":0,"trunkpktstransmitted":"0","trunkpktstransmittedrate":0,"nictotmulticastpkts":"278537","nicmulticastpktsrate":0,"totnetscalerpkts":"2493179","netscalerpktsrate":6,"rxlacpdu":"0","rxlacpdurate":0,"txlacpdu":"0","txlacpdurate":0,"errpktrx":"0","errpktrxrate":0,"errpkttx":"0","errpkttxrate":0,"errifindiscards":"0","errifindiscardsrate":0,"nicerrifoutdiscards":"0","nicerrifoutdiscardsrate":0,"errdroppedrxpkts":"2797172","errdroppedrxpktsrate":32,"errdroppedtxpkts":"0","errdroppedtxpktsrate":0,"errlinkhangs":"0","nicstsstalls":"0","nictxstalls":"0","nicrxstalls":"0","nicerrdisables":"0","linkreinits":"0","totmacmoved":"0","macmovedrate":0,"errnicmuted":"0","rxcrcerrors":"0","rxcrcerrorsrate":0,"interfacealias":"","curlinkstate":"DOWN"},{"id":"LO/1","curintfstate":"UP","curlinkuptime":"4.06:45:27","curlinkdowntime":"00:00:00","totrxbytes":"5134180570","rxbytesrate":14597,"tottxbytes":"6826375522","txbytesrate":18601,"totrxpkts":"36267172","rxpktsrate":100,"tottxpkts":"71618978","txpktsrate":195,"jumbopktsreceived":"0","jumbopktsreceivedrate":0,"jumbopktstransmitted":"0","jumbopktstransmittedrate":0,"trunkpktsreceived":"0","trunkpktsreceivedrate":0,"trunkpktstransmitted":"0","trunkpktstransmittedrate":0,"nictotmulticastpkts":"0","nicmulticastpktsrate":0,"totnetscalerpkts":"36267172","netscalerpktsrate":100,"rxlacpdu":"0","rxlacpdurate":0,"txlacpdu":"0","txlacpdurate":0,"errpktrx":"0","errpktrxrate":0,"errpkttx":"0","errpkttxrate":0,"errifindiscards":"0","errifindiscardsrate":0,"nicerrifoutdiscards":"0","nicerrifoutdiscardsrate":0,"errdroppedrxpkts":"0","errdroppedrxpktsrate":0,"errdroppedtxpkts":"0","errdroppedtxpktsrate":0,"errlinkhangs":"0","nicstsstalls":"0","nictxstalls":"0","nicrxstalls":"0","nicerrdisables":"0","linkreinits":"0","totmacmoved":"0","macmovedrate":0,"errnicmuted":"0","rxcrcerrors":"0","rxcrcerrorsrate":0,"interfacealias":"","curlinkstate":"DOWN"}]}
- path: /nitro/v1/stat/service
methods: ['GET']
responses:
- status_code: 200
body: |-
{"errorcode": 0, "message": "Done", "severity": "NONE", "service": [{"name": "nshttpd-gui-127.0.0.1-80", "throughput": "0", "throughputrate": 0, "avgsvrttfb": "34", "primaryipaddress": "127.0.0.1", "primaryport": 80, "servicetype": "HTTP", "state": "UP", "totalrequests": "15133", "requestsrate": 0, "totalresponses": "15133", "responsesrate": 0, "totalrequestbytes": "8334520", "requestbytesrate": 139, "totalresponsebytes": "26482988", "responsebytesrate": 316, "curclntconnections": "8", "surgecount": "0", "cursrvrconnections": "2", "svrestablishedconn": "2", "curreusepool": "2", "maxclients": "0", "curload": "0", "totalconnreassemblyqueue75": "0", "totalconnreassemblyqueueflush": "0", "httpmaxhdrszpkts": "0", "httpmaxhdrfldlenpkts": "0", "tcpmaxooopkts": "0", "curtflags": "0", "totsvrttlbtransactions": "0", "toleratingttlbtransactions": "0", "frustratingttlbtransactions": "0", "vsvrservicehits": "0", "vsvrservicehitsrate": 0, "activetransactions": "0", "serviceorder": "0"}, {"name": "nshttpd-vpn-127.0.0.1-81", "throughput": "0", "throughputrate": 0, "avgsvrttfb": "0", "primaryipaddress": "127.0.0.1", "primaryport": 81, "servicetype": "HTTP", "state": "DOWN", "totalrequests": "0", "requestsrate": 0, "totalresponses": "0", "responsesrate": 0, "totalrequestbytes": "0", "requestbytesrate": 0, "totalresponsebytes": "0", "responsebytesrate": 0, "curclntconnections": "0", "surgecount": "0", "cursrvrconnections": "0", "svrestablishedconn": "0", "curreusepool": "0", "maxclients": "30", "curload": "0", "totalconnreassemblyqueue75": "0", "totalconnreassemblyqueueflush": "0", "httpmaxhdrszpkts": "0", "httpmaxhdrfldlenpkts": "0", "tcpmaxooopkts": "0", "curtflags": "0", "totsvrttlbtransactions": "0", "toleratingttlbtransactions": "0", "frustratingttlbtransactions": "0", "vsvrservicehits": "0", "vsvrservicehitsrate": 0, "activetransactions": "0", "serviceorder": "0"}]}
5 changes: 5 additions & 0 deletions packages/citrix_adc/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "0.2.0"
changes:
- description: Citrix ADC integration package with "service" data stream.
type: enhancement
link: https://github.com/elastic/integrations/pull/4364
- version: "0.1.0"
changes:
- description: Citrix ADC integration package with "interface" data stream.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fields:
tags:
- preserve_original_event
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"nshttpd-gui-127.0.0.1-80","throughput":"0","throughputrate":0,"avgsvrttfb":"17","primaryipaddress":"127.0.0.1","primaryport":80,"servicetype":"HTTP","state":"UP","totalrequests":"12578","requestsrate":0,"totalresponses":"12578","responsesrate":0,"totalrequestbytes":"7091409","requestbytesrate":69,"totalresponsebytes":"23688619","responsebytesrate":151,"curclntconnections":"5","surgecount":"0","cursrvrconnections":"1","svrestablishedconn":"1","curreusepool":"1","maxclients":"0","curload":"0","totalconnreassemblyqueue75":"0","totalconnreassemblyqueueflush":"0","httpmaxhdrszpkts":"0","httpmaxhdrfldlenpkts":"0","tcpmaxooopkts":"0","curtflags":"0","totsvrttlbtransactions":"0","toleratingttlbtransactions":"0","frustratingttlbtransactions":"0","vsvrservicehits":"0","vsvrservicehitsrate":0,"activetransactions":"0","serviceorder":"0"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"expected": [
{
"citrix_adc": {
"service": {
"client_connection": {
"count": 5.0
},
"primary": {
"ip_address": "127.0.0.1",
"port": 80
},
"request": {
"bytes": {
"rate": 69,
"value": 7091409.0
},
"count": 12578.0,
"rate": 0
},
"response": {
"bytes": {
"rate": 151,
"value": 2.368862E7
},
"count": 12578.0,
"rate": 0
},
"reuse_pool": 1.0,
"server": {
"connection": {
"count": 1.0,
"established": {
"count": 1.0
}
},
"time_to_first_byte": {
"avg": 17.0
}
},
"surge_queue": {
"count": 0.0
},
"throughput": {
"rate": 0,
"value": 0.0
},
"transaction": {
"active": {
"count": 0.0
},
"frustrating": {
"count": 0.0
},
"time_to_last_byte": {
"count": 0.0
},
"tolerable": {
"count": 0.0
}
}
}
},
"ecs": {
"version": "8.4.0"
},
"event": {
"category": [
"web"
],
"kind": "event",
"module": "citrix_adc",
"original": "{\"name\":\"nshttpd-gui-127.0.0.1-80\",\"throughput\":\"0\",\"throughputrate\":0,\"avgsvrttfb\":\"17\",\"primaryipaddress\":\"127.0.0.1\",\"primaryport\":80,\"servicetype\":\"HTTP\",\"state\":\"UP\",\"totalrequests\":\"12578\",\"requestsrate\":0,\"totalresponses\":\"12578\",\"responsesrate\":0,\"totalrequestbytes\":\"7091409\",\"requestbytesrate\":69,\"totalresponsebytes\":\"23688619\",\"responsebytesrate\":151,\"curclntconnections\":\"5\",\"surgecount\":\"0\",\"cursrvrconnections\":\"1\",\"svrestablishedconn\":\"1\",\"curreusepool\":\"1\",\"maxclients\":\"0\",\"curload\":\"0\",\"totalconnreassemblyqueue75\":\"0\",\"totalconnreassemblyqueueflush\":\"0\",\"httpmaxhdrszpkts\":\"0\",\"httpmaxhdrfldlenpkts\":\"0\",\"tcpmaxooopkts\":\"0\",\"curtflags\":\"0\",\"totsvrttlbtransactions\":\"0\",\"toleratingttlbtransactions\":\"0\",\"frustratingttlbtransactions\":\"0\",\"vsvrservicehits\":\"0\",\"vsvrservicehitsrate\":0,\"activetransactions\":\"0\",\"serviceorder\":\"0\"}",
"type": [
"info"
]
},
"related": {
"ip": [
"127.0.0.1"
]
},
"service": {
"name": "nshttpd-gui-127.0.0.1-80",
"state": "UP",
"type": "HTTP"
},
"tags": [
"preserve_original_event"
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: citrix_adc
vars:
hostname: http://{{Hostname}}:{{Port}}
username: nsroot
password: nsroot
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
config_version: 2
interval: {{period}}
request.url: {{hostname}}/nitro/v1/stat/service
request.method: GET
{{#if username}}
{{#if password}}
auth.basic.user: {{username}}
auth.basic.password: {{password}}
{{/if}}
{{/if}}
response.split:
target: body.service
{{#if ssl}}
request.ssl: {{ssl}}
{{/if}}
tags:
{{#if preserve_original_event}}
- preserve_original_event
{{/if}}
{{#each tags as |tag|}}
- {{tag}}
{{/each}}
{{#contains "forwarded" tags}}
publisher_pipeline.disable_host: true
{{/contains}}
{{#if processors}}
processors:
{{processors}}
{{/if}}
Loading