Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Graphite formatters #203

Closed
wants to merge 1 commit into from
Closed

add Graphite formatters #203

wants to merge 1 commit into from

Conversation

kennydee
Copy link
Contributor

@kennydee kennydee commented Jan 6, 2014

Hi,

This PR allow to use Phantomas to easily export results into Graphite backend.

./phantomas --url http://www.google.com --format graphite | nc mygraphite.org 2003

will generate a graphite node : stats_counts.phantomas.google-com.<metricsname> for each metrics computed by Phantomas.

You could then add a cron job for your website to do this every 10 minutes for exemple, in order to have an impressive dashboard for Synthetic User Monitoring made by Phantomas, like this :

webperf_phantomas_-_graphite_dashboard

Thanks.

@macbre
Copy link
Owner

macbre commented Jan 6, 2014

@kennydee, thanks for the PR. As a part of #186 reporters will be rewritten to be run in NodeJS context (not within PhantomJS script). This will give us the freedom of, for instance using statsd module to emit metrics - #10

Please wait with implementing this feature until #186 is done. It will allow us to send UDP datagrams to graphite backend directly from phantomas runner script (without pipe-ing it via nc). Or graphite npm module can be used.

@macbre macbre closed this Jan 6, 2014
* if "stats_counts.phantomas" doesn't fit your needs, just replace it :
* Use with ./phantomas --url <yoururl.com> --format graphite | replace "stats_counts.phantomas" "whatuwant" | nc <yourgraphitehost.org> <graphiteport>
*/
var fold = require('travis-fold');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pure curiosity: why would you need folding for Travis when generating metrics to be sent to graphite?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of how the plain formatter was made... So no valid reason.

@kennydee
Copy link
Contributor Author

kennydee commented Jan 7, 2014

👍
Thanks for your answer.
Will be waiting for #186 to be done ;-)

@macbre
Copy link
Owner

macbre commented Jan 15, 2014

@kennydee: #186 is completed and merged into master. You can take a look at #10 to see how "asynchronous" reporter can be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants