loading scripts into graphite?

Asked by Roland

Hi,

is there a way to load (or execute) a script (i.e. a series of commands stored in a file) into graphite?
If not, then this would be a nice basic feature to add...

here is the usual situation where it comes up as an issue:

Say, I have written a script and saved it in a text file. Here is an example script that displays
the scaled version of SP500 index:

set spprice charts ES.ESZ9
set sp scale($spprice,0.5)
create s
draw $sp in s from -8hours every 3sec

This script uses the December 2009 future contract values. The problem is that these futures expire every three months, and then you have to update your displays. This work would amount to editing one name in line 1 of the script when the contract expires if I could just reload the script from file. Without this capability, however, I have to manually copy and paste all the lines of the scripts into the graphite interpreter and then save it as a view. This gets very annoying as you have many displays much longer and more complicated than the above one...

thanks

Roland

Question information

Language:
English Edit question
Status:
Answered
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
chrismd (chrismd) said :
#1

Unfortunately there is not really a good way to do this right now. I am going to cut a release in the next couple days but I will try to figure out a good simple solution before then and I'll update this question when I do.

Can you help with this problem?

Provide an answer of your own, or ask Roland for more information if necessary.

To post a message you must log in.