Welcome to the Pandora FMS Module Library

 
This is a library with modules, documentation and tools for Pandora FMS users, both public Open Source and Enterprise. Please use your support credentials (same as used to enter support/ticketing system) in the menu to your right. You will be granted access to a resourceful module library, such as Oracle, VMware, JBoss and others, ready to be used in production enviroments, with official professional support from Artica. If you do not own an enterprise account, you still can browse and download lots of modules, you can even register a free account and contribute with your own modules/tools for other public users.

Home > Miscelaneous

Stock monitoring

Author: slerena2 Create in: 08/15/2009 Update in: 01/01/1970
Rating:
Module type : Local module


This is a sample on how monitoring Stock values from public websites and put values in Pandora, ready to warn you by SMS or put data inside to make fancy graphs.

Module data

module_begin
module_name Google_Stock
module_type generic_data
module_description Stock value of Google (GOOG) in Nasdac
module_exec echo -e "GET http://download.finance.yahoo.com/d/quotes.csv?s=GOOG&f=sl1d1t1c1ohgv&e=.csv HTTP/1.0\n\n" | nc -w 10 download.finance.yahoo.com 80 | tail -1 | cut -f 2 -d ","
module_end

module_begin
module_name Intel_Stock
module_type generic_data
module_description Stock value of Intel (INTC) in Nasdac
module_exec echo -e "GET http://download.finance.yahoo.com/d/quotes.csv?s=INTC&f=sl1d1t1c1ohgv&e=.csv HTTP/1.0\n\n" | nc -w 10 download.finance.yahoo.com 80 | tail -1 | cut -f 2 -d ","
module_end

module_begin
module_name Oracle_Stock
module_type generic_data
module_description Stock value of Oracle (ORCL) in Nasdac
module_exec echo -e "GET http://download.finance.yahoo.com/d/quotes.csv?s=ORCL&f=sl1d1t1c1ohgv&e=.csv HTTP/1.0\n\n" | nc -w 10 download.finance.yahoo.com 80 | tail -1 | cut -f 2 -d ","
module_end

module_begin
module_name Dell_Stock
module_type generic_data
module_description Stock value of DELL (DELL) in Nasdac
module_exec echo -e "GET http://download.finance.yahoo.com/d/quotes.csv?s=DELL&f=sl1d1t1c1ohgv&e=.csv HTTP/1.0\n\n" | nc -w 10 download.finance.yahoo.com 80 | tail -1 | cut -f 2 -d ","
module_end

module_begin
module_name Microsoft_Stock
module_type generic_data
module_description Stock value of Microsoft (MSFT) in Nasdac
module_exec echo -e "GET http://download.finance.yahoo.com/d/quotes.csv?s=MSFT&f=sl1d1t1c1ohgv&e=.csv HTTP/1.0\n\n" | nc -w 10 download.finance.yahoo.com 80 | tail -1 | cut -f 2 -d ","
module_end

module_begin
module_name AMD_Stock
module_type generic_data
module_description Stock value of AMD (AMD) in Nasdac
module_exec echo -e "GET http://download.finance.yahoo.com/d/quotes.csv?s=AMD&f=sl1d1t1c1ohgv&e=.csv HTTP/1.0\n\n" | nc -w 10 download.finance.yahoo.com 80 | tail -1 | cut -f 2 -d ","
module_end

module_begin
module_name Inditex_Ibex35
module_type generic_data
module_description Stock value of Inditex in Ibex35
module_exec echo -e "GET http://abc.hoyinversion.com/cotizaciones/Inditex-M HTTP/1.0\n\n" | nc -w 10 abc.hoyinversion.com 80 | grep '<!-- <td><div class="sube">[0-9]*\.[0-9]*(' | grep -o "[0-9]*\.[0-9]*" | head -1
module_end

module_begin
module_name Indra-A_Ibex35
module_type generic_data
module_description Stock value of Indra-A in Ibex35
module_exec echo -e "GET http://abc.hoyinversion.com/cotizaciones/Indra-a-NE HTTP/1.0\n\n" | nc -w 10 abc.hoyinversion.com 80 | grep '<!-- <td><div class="sube">[0-9]*\.[0-9]*(' | grep -o "[0-9]*\.[0-9]*" | head -1
module_end