Skip to content

tlierdotfr/nagios-plugin-gcp-resource

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nagios-plugin-gcp-resource

Nagios Plugin for GCP Ressource metric monitoring.

Build

Build on linux

# go get -u cloud.google.com/go/monitoring/apiv3
# go get -u github.com/jessevdk/go-flags
# go build check_stackdriver.go

Build on Windows

# GOOS=linux GOARCH=amd64 go build nagios-plugin-gcp-resource.go

Usage

Sample command

# ./nagios-plugin-gcp-resource -g 'sample-project' -a '/path/to/auth-key.json' \
-m 'storage.googleapis.com/storage/object_count' \
-f 'resource.type = "gcs_bucket" AND resource.labels.bucket_name = "name of gcs bucket"' \
-p 300 -d 240 -e 'LAST' -w 50000 -c 100000

Arguments

option long option required discription
-g --project true GCP project id.
-a --auth false GCP authenticate key.
-m --metric true Monitoring metric.
-f --filter flase Filter query.
-d --delay false Shift the acquisition period. (min)
-p --period flase Metric acquisition period. (min)
-e --evalution false Metric evalute type. ("MAX", "LAST", "SUM")
-w --warning false Warning threshold.
-c --critical flase Critical threshold.

Stack driver metric list

https://pkg.go.dev/google.golang.org/api/monitoring/v3?tab=doc

Trademark

Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner.

License

MIT

About

Nagios Plugin for GCP StackDriver metric monitoring.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%