Skip to content

Commit

Permalink
add azurerm_keyvault_entries metric
Browse files Browse the repository at this point in the history
general refactoring and add new metric azurerm_keyvault_entries

Signed-off-by: Markus Blaschke <[email protected]>
  • Loading branch information
mblaschke committed May 2, 2021
1 parent f7241e6 commit a2acbbd
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 146 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ Metrics
|----------------------------------------|---------------------------------------------------------------------------------------|
| `azurerm_keyvault_info` | Azure KeyVault information |
| `azurerm_keyvault_status` | Azure KeyVault status information (eg. if accessable from exporter) |
| `azurerm_keyvault_entries` | Count of entries (seperated by type) inside Azure KeyVault |
| `azurerm_keyvault_key_info` | General inforamtions about keys |
| `azurerm_keyvault_key_status` | Status information (notBefore & expiry date) |
| `azurerm_keyvault_secret_info` | General inforamtions about secrets |
| `azurerm_keyvault_secret_status` | Status information (notBefore & expiry date) |
| `azurerm_keyvault_certificate_info` | General inforamtions about certificate |
| `azurerm_keyvault_certificate_status` | Status information (notBefore & expiry date) |
| `azurerm_ratelimit` | Azure API ratelimit information (from last api call) |

3 changes: 2 additions & 1 deletion azure_tag_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"fmt"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
"regexp"
"strings"
)
Expand Down Expand Up @@ -75,7 +76,7 @@ func (t *AzureTagFilter) filterTags(tags map[string]*string, usePrometheusName b
case "title":
filterTagValue = strings.ToTitle(filterTagValue)
default:
panic(fmt.Sprintf("Unknown filter method \"%v\" specified for tag \"%v\"", method, filterTag.name))
log.Panic(fmt.Sprintf("unknown filter method \"%v\" specified for tag \"%v\"", method, filterTag.name))
}
}
}
Expand Down
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@ require (
github.com/Azure/azure-sdk-for-go v53.4.0+incompatible
github.com/Azure/go-autorest/autorest v0.11.18
github.com/Azure/go-autorest/autorest/azure/auth v0.5.7
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
github.com/Azure/go-autorest/autorest/to v0.4.0
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/gofrs/uuid v4.0.0+incompatible // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/jessevdk/go-flags v1.5.0
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/prometheus/client_golang v1.10.0
github.com/prometheus/common v0.23.0 // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
github.com/sirupsen/logrus v1.8.1
github.com/webdevops/go-prometheus-common v0.0.0-20200601190815-465c9d5d262b
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b // indirect
golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
)
Loading

0 comments on commit a2acbbd

Please sign in to comment.