Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bittorrent/org.bittorrent.scribble
Clojure library for generating Graphite graph URLs
https://github.com/bittorrent/org.bittorrent.scribble
Last synced: about 1 month ago
JSON representation
Clojure library for generating Graphite graph URLs
- Host: GitHub
- URL: https://github.com/bittorrent/org.bittorrent.scribble
- Owner: bittorrent
- License: epl-1.0
- Created: 2014-10-28T18:19:25.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-29T19:23:28.000Z (about 10 years ago)
- Last Synced: 2023-03-10T20:37:51.884Z (almost 2 years ago)
- Language: Clojure
- Size: 164 KB
- Stars: 4
- Watchers: 16
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# org.bittorrent.scribble
A Clojure library designed to construct [Graphite](http://graphite.readthedocs.org/en/latest/index.html) graph URLs.
## Installation
Add this to your `project.clj`'s dependencies:
[org.bittorrent.scribble "0.1.0"]
## Usage
(ns my-app
(:require [org.bittorrent.scribble :as scribble]))
(scribble/build-url host-params graph-params)
=> "http://graphite.whatever.com/render?from=-2hours&target=some.stats.one&target=some.stats.two"
`host-params` should be a map containing the keys:
{
:host "graphite.whatever.com" ; required
:scheme "https" ; optional - defaults to "http"
:port 8080 : optional - defaults to unspecified, lets browser choose
:user "myuser" ; optional - for http basic auth
:passwd "asdf" ; optional - only include if you input a username
}
`graph-params` should be a map containing valid Graphite arguments, similar to the following:{
:from "-2hours"
:until "now"
:targets ["stats.info.firstTarget" "stats.info.secondTarget"]
}
Any key may have a vector of multiple values; it will be repeated in the URL as a result. Doing so is optional, however, even for `:targets`.## License
Copyright © 2014 BitTorrent, Inc. Written by Jason Whitlark and Aaron Cohen.
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.