mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-07 15:53:39 +01:00
Documentation: clarify api key usage for pfsense v1 vs v2 (#3766)
--------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
parent
6ce67b5ab8
commit
a996d43bbf
@ -9,7 +9,7 @@ This widget requires the installation of the [pfsense-api](https://github.com/ja
|
|||||||
|
|
||||||
Once pfSense API is installed, you can set the API to be read-only in System > API > Settings.
|
Once pfSense API is installed, you can set the API to be read-only in System > API > Settings.
|
||||||
|
|
||||||
There are two currently supported authentication modes: 'Local Database' and 'API Token'. For 'Local Database', use `username` and `password` with the credentials of an admin user. For 'API Token', utilize the `headers` parameter with `client_token` and `client_id` obtained from pfSense as shown below. Do not use both headers and username / password.
|
There are two currently supported authentication modes: 'Local Database' and 'API Key' (v2) / 'API Token' (v1). For 'Local Database', use `username` and `password` with the credentials of an admin user. The specifics of using the API key / token depend on the version of the pfSense API, see the config examples below. Do not use both headers and username / password.
|
||||||
|
|
||||||
The interface to monitor is defined by updating the `wan` parameter. It should be referenced as it is shown under Interfaces > Assignments in pfSense.
|
The interface to monitor is defined by updating the `wan` parameter. It should be referenced as it is shown under Interfaces > Assignments in pfSense.
|
||||||
|
|
||||||
@ -17,15 +17,25 @@ Load is returned instead of cpu utilization. This is a limitation in the pfSense
|
|||||||
|
|
||||||
Allowed fields: `["load", "memory", "temp", "wanStatus", "wanIP", "disk"]` (maximum of 4)
|
Allowed fields: `["load", "memory", "temp", "wanStatus", "wanIP", "disk"]` (maximum of 4)
|
||||||
|
|
||||||
|
For version 2:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
widget:
|
widget:
|
||||||
type: pfsense
|
type: pfsense
|
||||||
url: http://pfsense.host.or.ip:port
|
url: http://pfsense.host.or.ip:port
|
||||||
username: user # optional, or API token
|
username: user # optional, or API key
|
||||||
password: pass # optional, or API token
|
password: pass # optional, or API key
|
||||||
headers: # optional, or username/password
|
headers: # optional, or username/password
|
||||||
Authorization: client_id client_token
|
X-API-Key: key
|
||||||
wan: igb0
|
wan: igb0
|
||||||
version: 2 # optional, defaults to 1 for api v1
|
version: 2 # optional, defaults to 1 for api v1
|
||||||
fields: ["load", "memory", "temp", "wanStatus"] # optional
|
fields: ["load", "memory", "temp", "wanStatus"] # optional
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For version 1:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
headers: # optional, or username/password
|
||||||
|
Authorization: client_id client_token # obtained from pfSense API
|
||||||
|
version: 1
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user