Created
November 9, 2016 04:49
-
-
Save nv1t/353a0c2a7bf2141cfe02db78ec169b2b to your computer and use it in GitHub Desktop.
Einhorn Schokolade Icinga Check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
URL="http://shop.ritter-sport.de/b2c/schokolade/social-media-limited-edition/einhorn.html" | |
SITE=$(curl -s "${URL}") | |
if echo "${SITE}" | grep "out-of-stock" > /dev/null 2> /dev/null; then | |
echo "OK: Sckokolade ist immer noch ausverkauft"; | |
exit 0; | |
fi; | |
if echo "${SITE}" | grep "add-to-cart" > /dev/null 2> /dev/null; then | |
echo "CRITICAL: Einhorn Schokolade wird gerade wieder angeboten!" | |
exit 2; | |
fi; | |
echo "UNKNOWN: Nicht sicher was grad mit der Einhorn Schokolade los ist." | |
exit 3; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment