Is there any extra step which I need to do? Could you let me know how to push data into prometheus database?
public class ExamplePushGateway {
static final CollectorRegistry pushRegistry = new CollectorRegistry();
static final Gauge g = (Gauge) Gauge.build().name("gauge").help("blah").register(pushRegistry);
/**
* Example of how to use the pushgateway, pass in the host:port of a pushgateway.
*/
public static void main(String[] args) throws Exception {
PushGateway pg = new PushGateway("localhost:9090" );
g.set(42);
pg.push(pushRegistry, "job");
}
}
Thanks and Regards,
Georgia
Hi,
I'm New to Prometheus server, I have a couple questions regarding use prometheus.
1. I'm trying to figure out whether if Prometheus is a good fit for our current application. Basically we have a centralized Traffic Monitor(Java process) which pull traffic counter data across all the network switches using SNMP every five minute and save to local database. We are thinking if it's possible to save traffic data using Prometheus database instead of our local database.
2. It seems prometheus is also a time series database like Open TSDB which has http put mechanism to allow user to input metric data.
Could you let me know if prometheus has any interface which we can push all the metric data every five minutes. By the way, it is not feasible for us to write SNMP exporter in all the network devices which can allow prometheus to scrape, since our application is dynamically discover the devices over the network.
3. can I use push gateway to feed traffic data into prometheus? I have my local prometheus server running, I can see web page from http://localhost:9090
I downloaded ExamplePushGateway and modify as below, but after it run it throws out Exception in thread "main" java.io.IOException: Response code from http://localhost:9090/metrics/job/job was 404
Is there any extra step which I need to do? Could you let me know how to push data into prometheus database?
public class ExamplePushGateway {
static final CollectorRegistry pushRegistry = new CollectorRegistry();
static final Gauge g = (Gauge) Gauge.build().name("gauge").help("blah").register(pushRegistry);
/**
* Example of how to use the pushgateway, pass in the host:port of a pushgateway.
*/
public static void main(String[] args) throws Exception {
PushGateway pg = new PushGateway("localhost:9090" );
g.set(42);
pg.push(pushRegistry, "job");
}
}
Hi,
I'm New to Prometheus server, I have a couple questions regarding use prometheus.
1. I'm trying to figure out whether if Prometheus is a good fit for our current application. Basically we have a centralized Traffic Monitor(Java process) which pull traffic counter data across all the network switches using SNMP every five minute and save to local database. We are thinking if it's possible to save traffic data using Prometheus database instead of our local database.
2. It seems prometheus is also a time series database like Open TSDB which has http put mechanism to allow user to input metric data.
Could you let me know if prometheus has any interface which we can push all the metric data every five minutes. By the way, it is not feasible for us to write SNMP exporter in all the network devices which can allow prometheus to scrape, since our application is dynamically discover the devices over the network.
3. can I use push gateway to feed traffic data into prometheus? I have my local prometheus server running, I can see web page from http://localhost:9090
I downloaded ExamplePushGateway and modify as below, but after it run it throws out Exception in thread "main" java.io.IOException: Response code from http://localhost:9090/metrics/job/job was 404
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Saturday, August 20, 2016 at 12:54:10 AM UTC-7, Brian Brazil wrote:
> On 20 August 2016 at 01:25, <georgia...@gmail.com> wrote:
> Hi,
>
> I'm New to Prometheus server, I have a couple questions regarding use prometheus.
>
> 1. I'm trying to figure out whether if Prometheus is a good fit for our current application. Basically we have a centralized Traffic Monitor(Java process) which pull traffic counter data across all the network switches using SNMP every five minute and save to local database. We are thinking if it's possible to save traffic data using Prometheus database instead of our local database.
>
> 2. It seems prometheus is also a time series database like Open TSDB which has http put mechanism to allow user to input metric data.
>
> Could you let me know if prometheus has any interface which we can push all the metric data every five minutes. By the way, it is not feasible for us to write SNMP exporter in all the network devices which can allow prometheus to scrape, since our application is dynamically discover the devices over the network.
>
>
>
> It sounds like you should use the SNMP exporter and get your dynamic discovery to write out a JSON file with the device locations for use by Prometheus. See http://www.robustperception.io/using-json-file-service-discovery-with-prometheus/
>
Does SNMP exporter need to run in the switch side? Is it possible that I can run SNMP exporter in my local server which can connect to switch using SNMP library. Do you have any SNMP exporter Java example?
Thanks and Regards,
Georgia
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.