modules/prometheus: add basic auth
This commit is contained in:
parent
97fcdefc2b
commit
74b67e1854
10 changed files with 184 additions and 194 deletions
|
@ -7,6 +7,7 @@ in
|
|||
{
|
||||
name,
|
||||
address,
|
||||
passwordFile ? null,
|
||||
port ? 443,
|
||||
scheme ? "https",
|
||||
...
|
||||
|
@ -16,6 +17,15 @@ in
|
|||
scheme = scheme;
|
||||
static_configs = [ { targets = [ "${address}${mkPort port}" ]; } ];
|
||||
}
|
||||
// (
|
||||
if isNull null then
|
||||
{ }
|
||||
else
|
||||
{
|
||||
basic_auth.username = "prom";
|
||||
basic_auth.password_file = passwordFile;
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
mkCaddyScrapes = mkFunction (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue