Skip to content

Instantly share code, notes, and snippets.

@virtadpt
Created July 8, 2014 17:16
Show Gist options
  • Save virtadpt/ace28469d7840df83094 to your computer and use it in GitHub Desktop.
Save virtadpt/ace28469d7840df83094 to your computer and use it in GitHub Desktop.
Huginn Agent Scenario: Ironmonger
{
"name": "Ironmonger",
"description": "Ironmonger is a network of agents which watches the stock prices of the 20 biggest defense contractors in the United States and alerts if their stock prices jump by more than three (3) standard deviations, meaning that one or more has just won a big contract and something's coming. Send an e-mail if something happens.",
"source_url": false,
"guid": "88f6cd314e66146e2314b6860c9e91d5",
"exported_at": "2014-07-08T17:15:18Z",
"agents": [
{
"type": "Agents::PeakDetectorAgent",
"name": "Ironmonger - Watch for rapid stock price changes",
"disabled": false,
"guid": "894d29210ca3415a06226951bed5b80a",
"options": {
"expected_receive_period_in_days": "4",
"value_path": "price",
"message": "The stock price of {{name}} (symbol: {{symbol}}) has suddenly spiked to ${{price}} USD per share. What's going on?"
},
"keep_events_for": 7,
"propagate_immediately": false
},
{
"type": "Agents::WebsiteAgent",
"name": "Ironmonger - Watches stock prices of defense contractors",
"disabled": false,
"guid": "e2ec929ffdf9717cdc20b91f5f9a9b59",
"options": {
"expected_update_period_in_days": "4",
"url": "http://finance.yahoo.com/webservice/v1/symbols/CACI,GR,DCP,NAV,MANT,TXT,COL,ATK,URS,KBR,XLS,UTC,GE,HON,CSC,OSK,SAIC,UTX,LLL,RTN,GD,NOC,BA,LMT/quote?format=json",
"type": "json",
"mode": "all",
"extract": {
"name": {
"path": "$.list.resources[*].resource.fields.name"
},
"symbol": {
"path": "$.list.resources[*].resource.fields.symbol"
},
"price": {
"path": "$.list.resources[*].resource.fields.price"
}
}
},
"schedule": "every_1h",
"keep_events_for": 7,
"propagate_immediately": false
},
{
"type": "Agents::EmailAgent",
"name": "Tripwire - Immediate E-mail Alerts",
"disabled": false,
"guid": "aabc3c63be0bf9f36e14017146968e36",
"options": {
"subject": "Exocortex: Tripwire Alert",
"headline": "Tripwire has detected the following events in the exocortex:",
"expected_receive_period_in_days": "1"
},
"propagate_immediately": false
}
],
"links": [
{
"source": 0,
"receiver": 2
},
{
"source": 1,
"receiver": 0
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment