![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
juttle-graphite-adapter
Advanced tools
Graphite adapter for the Juttle data flow language, with read & write support.
Reading existing metrics is as simple as:
read graphite -from :1 week ago: name ~ 'app1.*.response_ms'
| reduce value = avg(value) by name
This will compute last week's average of every metric matching app1.*.response_ms
.
If you encoded something like the region or hostname into the metric name then
you can easily parse that name in juttle. Let's say your metric name looks
like region.host.metric_name
. Then you can calculate the average value of the
response time per host every 1 minute for the last 24 hours like so:
read graphite -from :24 hours ago: name ~ '*.response_ms'
| put host = String.split(name, '.')[1]
| reduce -every :1 minute: value = avg(value) by host
Like Juttle itself, the adapter is installed as a npm package. Both Juttle and the adapter need to be installed side-by-side:
$ npm install juttle
$ npm install juttle-graphite-adapter
The adapter needs to be registered and configured so that it can be used from
within Juttle. To do so, add the following to your ~/.juttle/config.json
file:
{
"adapters": {
"graphite": {
"carbon": {
"host": "localhost",
"port": 2003
},
"webapp": {
"host": "localhost",
"port": 8080,
"username": "...",
"password": "..."
}
}
}
}
Keys in carbon
specify the location of Graphite storage backend, keys in
webapp
contain configuration for the Graphite frontend.
Graphite stores metrics with:
name
- alphanumeric sequence defining a path to your metric that you should
consider naming appropriately. See graphite documentation
for more details.
value
- numerical value for the metric identified
timestamp
- the timestamp associated with this metric as an integer of
seconds since epoch.
When reading data out of graphite every metric will be converted into
a point with the name
, value
, and time
fields.
Name | Type | Required | Description |
---|---|---|---|
from | moment | no | select points after this time (inclusive) |
to | moment | no | select points before this time (exclusive) |
This adapter maps data points containing the fields name
, value
, and
time
to a graphite metric. All other points missing these fields are not
written and a warning is issued instead.
So, for writing, the key thing is to make sure your data contains the fields
name
, value
and time
. When constructing data from a data point that
has multiple fields, make sure to pick a naming convention you can easily use
to parse back out of graphite later. More details on naming your metric can be found
in the graphite wiki.
Want to contribute? Awesome! Don’t hesitate to file an issue or open a pull request.
FAQs
Juttle adapter for Graphite
The npm package juttle-graphite-adapter receives a total of 2 weekly downloads. As such, juttle-graphite-adapter popularity was classified as not popular.
We found that juttle-graphite-adapter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.