Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Stock check

Rating
0 votes
Favoured:
0
Current Version
.8
Last Release Date
2018-01-03
Compatible With
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
Hits
2143
Files:
FileDescription
stock.shstock.sh

Help Support Ethan Galstad's New Project:

Help Support Ethan

A Message From The Founder...

As the founder of Nagios, I'm asking for your help in a cause that's dear to my heart.

I'm launching a new project to help better the world by providing the information, ideas, and inspiration that I believe can improve the lives of people everywhere.

I know you're busy managing networks, but I would appreciate it if you would consider liking my Facebook page and showing your support for the content and messages I produce by sharing them with your friends and family.

You can learn more about my project by visiting ethangalstad.me/nagios. Thank you for your time. I wish you all the best in your endeavors, whatever they may be.

- Ethan

Stock check
Simple bash script returning stock quotes
This bash script queries the Tradier API to retrieve stock quotes.

It requires an account(free) at https://developer.tradier.com.

Currently it will work with the last, change, change_percentage, volume, average_volume, last_volume, trade_date, open, high, low, close, prevclose, week_52_high, week_52_low, bid, bidsize, bid_date, ask, asksize, and ask_date fields returned by Tradier.

Usage:

./stock.sh [SYMBOL] [Tradier_ID] [FIELD] [WARNING RANGE] [CRITICAL RANGE]

Example to pull last ask for google:

./stock.sh GOOG 98767ly1z21JjHa5T4dyR5m12345 ask 1000:1100 900:1200

Thresholds follow http://nagios-plugins.org/doc/guidelines.html#THRESHOLDFORMAT