Add a simple function to graphite

Hi everyone,

I added a simple function to graphite (a kind of threshold one), in graphite/functions.py

I would like this function to be mapped in the grafana graphite datasoure. So I added it to gfunc.ts

However when I reload grafana-server, I dont see this new function.

I think that I’m missing something. Sould I “rebuild” the graphite datasource plugin, or something like this ?

Thanks,

Are you using Graphite 1.1 (which is when support was added)?

Also sounds like you are putting them in the wrong place from the second link below:

Custom plugin files may be placed in the /opt/graphite/webapp/graphite/functions/custom folder and will be loaded automatically when graphite starts.

Here are some resources:

I guess you should be doing this.

https://grafana.com/docs/project/building_from_source/

Make your changes to the file inside public folder and run yarn install