#!/bin/bash
CONTAINER=ubuntu
RUNNING=$(docker inspect --format="{{ .State.Running }}" $CONTAINER 2> /dev/null)
if [ "$RUNNING" == "false" ]; then
echo "CRITICAL - $CONTAINER is not running."
exit 2
else
echo "OK - $CONTAINER is running."
exit 0
fi
CONTAINER=ubuntu
RUNNING=$(docker inspect --format="{{ .State.Running }}" $CONTAINER 2> /dev/null)
if [ "$RUNNING" == "false" ]; then
echo "CRITICAL - $CONTAINER is not running."
exit 2
else
echo "OK - $CONTAINER is running."
exit 0
fi
No comments:
Post a Comment