Respect the author's labor , Please indicate the author and the address of the original  http://www.cnblogs.com/txwsqk/p/6522854.html

Reference resources  https://graphite.readthedocs.io/en/latest/functions.html#function-plugins

/opt/graphite/webapp/graphite/settings.py

# Function plugins
FUNCTION_PLUGINS = ['linkedme.aliasByMap',]
/opt/graphite/webapp/graphite/functions/custom# ls
__init__.py __init__.pyc linkedme.py linkedme.pyc

I added a custom function   cat linkedme.py

#coding:utf-8
from graphite.functions.params import Param, ParamTypes def aliasByMap(requestContext, seriesList):
kv = {
'':' What you want to show ',
}
for series in seriesList:
series.name = kv[series.name]
return seriesList aliasByMap.group = 'Alias'
aliasByMap.params = [
Param('seriesList', ParamTypes.seriesList, required=True),
] SeriesFunctions = {
'aliasByMap': aliasByMap,
}

such grafana Can be used in

graphite custom functions More articles about

  1. [ translate ] Using Custom Functions in a Report Use self defined functions in reports

    Using Custom Functions in a Report  Use self defined functions in reports   FastReport has a large number of built-in standard ...

  2. [SCSS] Write Custom Functions with the SCSS @function Directive

    Writing SCSS @functions is similar to writing functions in other programming languages; they can acc ...

  3. Underscore Analysis of the overall structure

    Preface finally , The landlord's 「Underscore Source code interpretation series 」underscore-analysis It's coming to an end , Pay attention to timeline You will find that the owner of the building has speeded up the speed of interpretation recently . November , eventful times , A lot of things have been done recently ...

  4. How to set up Vimrc

    .title { text-align: center } .todo { font-family: monospace; color: red } .done { color: green } .t ...

  5. HTML5 Information

    1 Canvas course <canvas> It's a new one for scripting ( Usually JavaScript) Drawn HTML Elements . for example , He can be used for drawing . Make combinations of pictures or simple animations ( It's not that simple, of course ).It ...

  6. window Lower installation jupyter

    1.Install [Anaconda](https://docs.continuum.io/anaconda/install#anaconda-install) It's actually installed anaconda It's already safe ...

  7. vim operation

    note:   from www.quora.com , Good website . The links are as follows : https://www.quora.com/What-are-some-impressive-demos-of-Vim- ...

  8. taglib Custom tag

    Customize <%@ taglib prefix="cf" uri="http://training.bmcc.com.cn/tld/functions"%> ...

  9. WordPress Theme development - ( 6、 ... and ) Create theme functions To be translated

    We’ve got a file structure in place, now let’s start adding things to them! First, we’re going to ad ...

Random recommendation

  1. node.js Next use RSA Encryption case (windows)

    1. install openss Direct download window Installation package under http://houjixin.blog.163.com/blog/static/3562841020144143494875/ Take my blog as an example ...

  2. windows The viewing software is 32 A still 64 position

    I have a computer with good configuration ,win10 64 A system of , But a recently downloaded software is very slow , I seriously want to know that the downloaded software is 64 It's still 32 Bit Baidu Google for a long time , Most say it's two ways : 1. Determine the installation path of the file , Such as ...

  3. MySQL Learning notes —— Indexes and views

    Indexes (index) And manage indexes A database object in the schema effect : It is used to speed up the query of table in database establish : Automatically create indexes on primary and unique keys Quickly locate data by using fast path access method , Reduced the number of disks I/O Separate from the table , ...

  4. oracle collect

    1.  senior sql Study ——with Clause http://blog.chinaunix.net/uid-10697776-id-2935678.html 2.java List Sort Collections ...

  5. 2018-2019-2 Network countermeasure technology 20162329 Exp6 Information gathering and vulnerability scanning

    Catalog Exp6 Information gathering and vulnerability scanning One . The principle of practice 1. Indirect collection 2. Collect directly 3. social engineering Two . Indirect collection 1. Zoomeye 2. FOFA 3. GHDB 4. whois 5. dig ...

  6. Linux Go to the homemade recycle bin

    Linux Go to the homemade recycle bin Believe in familiarity linux Everyone in the system knows rm The severe , Most of them have heard of rm Production accidents caused by , This article will describe in detail how to linux Make recycle bin to avoid data deletion , How to recover the data in the recycle bin , How to view feedback ...

  7. 【Qt Official Learning Notes 】Address Book Example( Agent model )

    The address book example shows how to use the proxy model to display different views on the data of a single model . This example provides an address book , Allows you to group contacts alphabetically into 9 Group :ABC.DEF.GHI.…,VW,…XYZ. This is done by using multiple views on the same model ...

  8. smartsvn Study ( 3、 ... and ) Error validating server certificate for

    Error validating server certificate for 'xxxxxxxxxxxx:443':  - The certificate is not issued by a tr ...

  9. WIFI modular ESP8266 How to use it 【 turn 】

    Reprinted from :http://www.itdadao.com/articles/c15a814052p0.html This article mainly talks about ESP8266 Module hardware connection works , As well as the server and client configuration implementation details ...

  10. Front end automation tools gulp

    Recently a project came into contact with these automation tools webpack gulp grunt wait .. webpack Modules can be introduced and Compress gulp and grunt Can be compressed Here's just to say gulp  Because the project only uses gu ...