Skip to content

Commit cf74d48

Browse files
committed
Add document about throttling requests to AAA servers
Signed-off-by: Dinesh Dutt <[email protected]>
1 parent c0ffdc2 commit cf74d48

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

docs/rate-limiting-AAA.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Rate Limiting AAA Server Requests
2+
3+
Many AAA servers (such as TACACS, Radius) cannot handle the rate at which SuzieQ can issue requests. This is especially true in larger installations, those with older AAA servers, or when command authorization is used in addition to authentication. The most common symptom of this problem is the authentication failed error message. To avoid user lockout, we stopped retrying on authentication failures. To fix this, we added three new parameters to the poller configuration. A consequence of throttling is of course that it takes longer to collect the data.
4+
5+
* **max-cmd-pipeline**: This is an integer value that ensures that no more than this number of requests are sent to a device in a second. Thus a value of 9 implies that we never have more than 9 outstanding commands or logins. If you use distributed pollers, you need to ensure that this number is a multiple of the number of pollers. Thus with a value of 9, you can use either 1 or 3 pollers. With 8, you can use 1, 2, or 4 pollers and so on. This is **specified in the suzieq-cfg.yml** file. The default is 0 i.e. no limits.
6+
7+
* **per-cmd-auth**: This is a boolean to specify whether need to throttle logins as well as commands sent to a device. This is required in installations where commands are authorized before execution. True means use it for commands as well as logins. This is specified in the devices section of the poller inventory file. The default is False.
8+
9+
* **retries-on-auth-fail**: Some older AAA servers fail even at low rates. In certain installations, a maximum of 3 authentication failures are tolerated before the user account is locked, and in some installations it can be anything more than a single failure. This parameter now enables us to support both types of installations. This is specified in the devices section of the poller inventory file. The default is 0, i.e. we never retry on authentication failure.
10+
11+
Here's a sample suzieq-cfg.yml file with the max-cmd-pipeline parameter (see the poller section).
12+
```
13+
data-directory: tests/data/parquet
14+
coalescer:
15+
period: 1h
16+
archive-directory:
17+
logging-level: DEBUG
18+
rest:
19+
# Uncomment these lines if you're using your own files for the REST server
20+
# The certificates listed below are provided purely to get started, In any
21+
# secure deployment, these must be generated specifically for the site and
22+
# these lines uncommented and containing the location of the site-specific file.
23+
# rest_certfile: /suzieq/cert.pem
24+
# rest_keyfile: /suzieq/key.pem
25+
#
26+
API_KEY: 496157e6e869ef7f3d6ecb24a6f6d847b224ee4f
27+
logging-level: WARNING
28+
address: 127.0.0.1
29+
port: 8000
30+
# no-https: True
31+
log-stdout: True
32+
# rest-certfile: /secrets/cert.pem
33+
# rest-keyfile: /secrets/key.pem
34+
# logfile: /tmp/sq-rest-server.log
35+
# log-stdout: True
36+
37+
poller:
38+
connect-timeout: 60
39+
period: 60
40+
logsize: 10000000
41+
logging-level: WARNING
42+
log-stdout: True
43+
max-cmd-pipeline: 4
44+
45+
ux:
46+
engine: pandas
47+
48+
analyzer:
49+
timezone: America/Los_Angeles
50+
```
51+
52+
Here's a sample inventory file with per-cmd-auth and retries-on-auth-fail set:
53+
```
54+
---
55+
sources:
56+
- name: ans
57+
type: ansible
58+
path: /tmp/ansinv
59+
60+
devices:
61+
- name: default
62+
per-cmd-auth: False
63+
retries-on-auth-fail: 2
64+
ignore-known-hosts: true
65+
66+
auths:
67+
- name: default
68+
username: vagrant
69+
password: vagrant
70+
71+
namespaces:
72+
- name: demo
73+
source: ans
74+
device: default
75+
```

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ nav:
1616
- Gathering Data:
1717
- Poller: poller.md
1818
- Inventory File: inventory.md
19+
- Rate Limiting AAA Server Requests: rate-limiting-AAA.md
1920
- Tables: tables.md
2021
- Transports: transports.md
2122
- Polling From a Local Folder: simnode.md

0 commit comments

Comments
 (0)