Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F13142550
check-prometheus.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
check-prometheus.sh
View Options
#!/bin/sh
# -------------------------------------------------------------
# Monitoring :: NRPE check :: Prometheus
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# Source file: roles/prometheus/monitoring/files/check-prometheus.sh
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
set
-e
EXIT_UNKNOWN
=
3
CHECK_COMMAND
=
"{{ dirs.bin }}/promtool"
CONFIG_FILE
=
"{{ dirs.etc }}/prometheus.yml"
if
!
command
-v
"
$CHECK_COMMAND
"
>/dev/null
2
>
&
1
;
then
echo
"promtool isn't available, can't run check"
>
&
2
exit
$EXIT_UNKNOWN
fi
# As far as tested, promtool exits with 0 or 1.
# Parsing and success messages are sent to stdout.
# Parsing and validation errors are sent to stderr.
"
$CHECK_COMMAND
"
check config
"
$CONFIG_FILE
"
> /dev/null
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Fri, Nov 21, 16:17 (18 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3186262
Default Alt Text
check-prometheus.sh (1 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment