[influxdb] backup strategies/best practices

2016-12-01 Thread Vick Khera
I've gotten InfluxDB up and running pretty well now, and I'm looking to 
automate some backups. Basically the only stuff I find is either 3 years 
old and doesn't apply, or is just the "backup" document in the manual.

So before I go and write up a bunch of scripts to do the "dump, tar, copy 
to remote" stuff, does anyone have anything built up already that will do 
remote and/or offsite backups? I would like to keep several days of backups 
and have the scripts automatically manage deleting old ones.

This is my last step before calling it "production" :)

Thanks.

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/e118a7de-2c71-481f-96b7-d398b7c682e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [influxdb] influxdb python tutorial not working

2016-12-01 Thread Ross McDonald
There is no precision specified on the writes, so they are defaulting to
nanosecond. The retention policy is also being set here

for 3 days so the writes are getting dropped as they're being written,
since the timestamps are very far in the past (in nanosecond land).

To fix it, you'll want to set the timestamp precision to "s" (seconds) here

:

```
client.write_points(series, retention_policy=retention_policy,
time_precision="s")
```


On Thu, Dec 1, 2016 at 2:38 PM,  wrote:

> Hi,
>
> I am new to influxdb.
>
> I have influxdb server version 1.0.1 running.
>
> I am using influxdb-python (influxdb-3.0.0) and trying the tutorial
>
> https://github.com/influxdata/influxdb-python/blob/master/
> examples/tutorial_server_data.py
>
> I get
>
> $ python tutorial_server_data.py
> Create database: tutorial
> Create a retention policy
> Write points #: 4320
> ResultSet({})
> Result: ResultSet({})
>
>
> i.e. I cannot read back any of the inserted values. I even relaxed the
> query to show all.
>
> Also when I do
>
> query = 'SHOW DATABASES'
> result = myclient.query(query)
> result
>
> I can see 'tutorial' in the output. So I am able to talk to my influxdb
> server
>
> But
> query = 'SHOW MEASUREMENTS'
> result = myclient.query(query)
> result
>
> give nothing.
>
> I assume I am missing something trivial.
>
> Can someone help?
>
> Thanks,
> Vikas
>
> --
> Remember to include the version number!
> ---
> You received this message because you are subscribed to the Google Groups
> "InfluxData" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to influxdb+unsubscr...@googlegroups.com.
> To post to this group, send email to influxdb@googlegroups.com.
> Visit this group at https://groups.google.com/group/influxdb.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/influxdb/ac0d5500-8707-41d9-8ed8-8fca8c9e446b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/CAD8sRLDQFkhse-1YB_tYwOuqrsCageGZFx5gL10-Kfa6-v2FYw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[influxdb] influxdb python tutorial not working

2016-12-01 Thread vikasapr
Hi,

I am new to influxdb.

I have influxdb server version 1.0.1 running.

I am using influxdb-python (influxdb-3.0.0) and trying the tutorial

https://github.com/influxdata/influxdb-python/blob/master/examples/tutorial_server_data.py

I get

$ python tutorial_server_data.py 
Create database: tutorial
Create a retention policy
Write points #: 4320
ResultSet({})
Result: ResultSet({})


i.e. I cannot read back any of the inserted values. I even relaxed the query to 
show all.

Also when I do

query = 'SHOW DATABASES'
result = myclient.query(query)
result

I can see 'tutorial' in the output. So I am able to talk to my influxdb server

But
query = 'SHOW MEASUREMENTS'
result = myclient.query(query)
result

give nothing.

I assume I am missing something trivial. 

Can someone help?

Thanks,
Vikas

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/ac0d5500-8707-41d9-8ed8-8fca8c9e446b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[influxdb] Re: Can't start as service on FreeBSD jail FreeNAS

2016-12-01 Thread Vick Khera
Check the influxdb log file in /var/log/influxdb/influxdb.log

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/b061e63c-c12f-4804-9291-50a6f364265c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[influxdb] Re: Extra stats, derivative, and alert at end of TICK script DOT view.

2016-12-01 Thread AAbouZaid
OK I found it :D
It's because "deadman" is enabled globally in Kapacitor config file.

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/6675a812-f574-45a3-9324-a6d99875d17f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[influxdb] Re: Telegraf statsd timing repeat the last value even when task is finished

2016-12-01 Thread Vick Khera
Perhaps you want to look at the statsd settings in telegraf.conf and turn 
on 

delete_timings = true

so timings only survive for one interval. That is the default, but maybe 
you turned it off? Personally I turn on the delete setting for all 
measurement types.

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/a8b758de-ea79-4283-b58f-277c425e7e93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[influxdb] Extra stats, derivative, and alert at end of TICK script DOT view.

2016-12-01 Thread AAbouZaid
Hello,

I'm not sure if that normal or not, but I did search about this point in the 
documentation and I did find anything.


In any TICK script I create, I always find 



An example for `cpu_example` task:

```
var query_data = batch
|query('''
SELECT percentile("usage_user", 95) as query_value
FROM "telegraf"."15d"."cpu"
''')
.period(5m)
.every(4m)
.fill('none')
.groupBy(time(1m), 'host')

```

And here the DOT part of output of `kapacitor show`:
```
kapacitor show cpu_example

DOT:
digraph CPU_cpu_usage {
graph [throughput="0.00 batches/s"];

query1 [avg_exec_time_ns="1.009318388s" batches_queried="2912" 
connect_errors="0" points_queried="14460" query_errors="0" ];

stats2 [avg_exec_time_ns="1.179459ms" ];
stats2 -> derivative3 [processed="2705"];

derivative3 [avg_exec_time_ns="6.999µs" ];
derivative3 -> alert4 [processed="2704"];

alert4 [alerts_triggered="2704" avg_exec_time_ns="177.822µs" 
crits_triggered="2704" infos_triggered="0" oks_triggered="0" 
warns_triggered="0" ];
```


So the question is, what are these extra "stats", "derivative", and "alert"?
Especially "alert" part since it triggering a lot of critical alerts!


Thanks.
Best

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/852d945b-bbd4-4955-bb8f-9045d3a2f2f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[influxdb] Re: Kapacitor filtering duplicate events

2016-12-01 Thread nathaniel
We are actively working on a solution to this problem. 
See 
https://github.com/influxdata/kapacitor/blob/nc-alert-service/ALERT_DESIGN.md 
The basic idea is that you will be able to both aggregate multiple alerts 
and rate limit sending alerts. Which should be able to prevent an alert 
storm

On Tuesday, November 29, 2016 at 6:05:49 PM UTC-7, kho...@gmail.com wrote:
>
> What is a good way to filter an alert storm? I have Kapacitor watching for 
> events in a measurement and alerting to PagerDuty if any occur. But in some 
> circumstances the underlying problem can cause a bunch of matching events 
> to come through.
>
> I would like to filter so I raise one event in PagerDuty (or to Slack, 
> etc) but not raise any more events for some short period of time.
>

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/ab16e5e1-eb31-4d9c-9cca-07e685e993f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [influxdb] influxdb-1.1.0-1.x86_64 admin UI not listening on port 8083

2016-12-01 Thread Ross McDonald
> Any reason to deprecate admin ui in influxdb-1.1.0-1.x86_64?

This has been discussed in more detail here:

https://groups.google.com/forum/#!topic/influxdb/1jhjX8kQF6M/discussion

> I did set enabled = true in [admin] in influxdb.conf. I am still not able
to get to the admin ui using http://influxdbserverip:8083

Did you make sure to uncomment the `[admin]` section name? The
configuration should look similar to:

```
[admin]
enabled = true
```

On Wed, Nov 30, 2016 at 8:46 AM, Kaushal Shriyan 
wrote:

> Hi,
>
> I am running influxdb-1.1.0-1.x86_64 on CentOS Linux release 7.2.1511
> (Core).
>
> #cat /etc/redhat-release
> *CentOS Linux release 7.2.1511 (Core)*
> #rpm -qa | grep influxdb
> *influxdb-1.1.0-1.x86_64*
> #ps aux | grep influx
> influxdb  1165  0.1  0.1 376860 15908 ?Ssl  16:34   0:14
> /usr/bin/influxd -config /etc/influxdb/influxdb.conf
> root 29295  0.0  0.0 112648   976 pts/0S+   20:14   0:00 grep
> --color=auto influx
> #netstat -anp | grep 8086
> tcp6   0  0 :::8086 :::*LISTEN
>  1165/influxd
> #netstat -anp | grep 8083
> #
>
> I have couple of questions
>
>- Any reason to deprecate admin ui in influxdb-1.1.0-1.x86_64?
>- I did set enabled = true in [admin] in influxdb.conf. I am still not
>able to get to the admin ui using http://influxdbserverip:8083
>
> Any help will be highly appreciable. Please let me know if you need any
> additional details to debug the admin UI issue.
>
> Thanks in Advance.
>
> Regards,
>
> Kaushal
>
> --
> Remember to include the version number!
> ---
> You received this message because you are subscribed to the Google Groups
> "InfluxData" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to influxdb+unsubscr...@googlegroups.com.
> To post to this group, send email to influxdb@googlegroups.com.
> Visit this group at https://groups.google.com/group/influxdb.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/influxdb/6257d8af-e7d0-45ec-85ab-7b4481fa4061%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/CAD8sRLBcVOSJP4Qjexiy4-c7r1B%2Bq6bnA%3DLG%3DkrKokCzTvVhzw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[influxdb] Re: Kapacitor subscription to influxdb traffic v/s InfluxdbRelay push to kapacitor

2016-12-01 Thread nathaniel
The relay copies all data it receives to all configured backends. The basic 
flow should be something like this:

client -> load balancer -> relays -> influxdb, kapacitor (can have multiple 
instances of each)

Kapacitor should be configured to disable subscriptions and use the load 
balancer when querying InfluxDB.

On Wednesday, November 30, 2016 at 7:41:08 AM UTC-7, jaya...@gmail.com 
wrote:
>
> Hi Nathan 
>
> While reading this discussion, I got a question on your statement 
>"I would look at option 2. This is where my questions comes in. If you 
> are running multiple relays, which I recommend you do, then it should not 
> be too difficult to update the config on each relay one at a time, making 
> use of the load balancer. Thus enabling you to add/remove Kapacitor 
> instances dynamically without downtime. " 
>
> My Questions here are 
> 1. If Relays are configured with Load balancer to sends the data points to 
> Kapacitor, the load balancer will send to only kapacitor instance right? 
> The load balance will not distribute the data points to multiple kapacitors 
> instances which are behind the load balancer. 
>
> 2. How to configure the relays to send the data points to Kapacitor and 
> what is the configuration required in Kapacitor? 
>
> Thanks 
> Jayanna 
>
>
>
>
> On Friday, November 18, 2016 at 1:13:04 PM UTC-5, nath...@influxdb.com 
> wrote: 
> > Kirtimaan, 
> > 
> > 
> > There are a few things at play here. Here are the questions I had while 
> reading about your setup: 
> > 
> > 
> > 1) Do you want multiple Kapacitor instances because of 
> redundancy/isolation or because you are worried about capacity? 
> > 2) Are you running multiple relays? If so how easy is it to reconfigure 
> them? 
> > 3) How often do you expect you will need a new Kapacitor instance? 
> Meaning, once every team is using it, are new teams created frequently or 
> would the need to create new Kapacitor instances flatten out? 
> > 
> > 
> > I don't need the answer to these question, but they should point you in 
> the right direction. 
> > 
> > 
> > Now to answer your questions: 
> > 
> > 
> > 1) I don't forsee any issues having multiple Kapacitor instances 
> connecting to the same InfluxDB instance. The Kapacitor instances will be 
> isolated and unaware of each other, InfluxDB will handle the subscriptions 
> well. We have tested this use case. 
> > 2) This is the tricky part. Since each InfluxDB server is receiving all 
> the data you can't have Kapacitor subscribe to both InfluxDB instances 
> without duplicating all your data to Kapacitor. As a result if you are 
> going to use subscriptions you have to pick only one InfluxDB server, which 
> means your HA Kapacitor story now has two points of failure, Kapacitor 
> itself and the InfluxDB server. Obviously not ideal 
> > 3) This depends on the workload each task adds, but we have tested 
> Kapacitor for use cases of 1000+ tasks. In other words as long as you have 
> the cpu/ram you need, which is sounds like you do, a single Kapacitor 
> instance should be efficient at handling many tasks. 
> > 
> > 
> > Since the answer to #2 is not ideal I would recommend the best 
> architecture would be to use the relay and not subscriptions. That leaves 
> two options: 
> > 
> > 
> > 1. Use a single Kapacitor instance 
> > 2. Run multiple Kapacitor instances behind the relay. 
> > 
> > 
> > Option 1 is the simplest but you risk one team creating a heavy task and 
> breaking alerting for all other teams. If this is a serious concern then I 
> would look at option 2. This is where my questions comes in. If you are 
> running multiple relays, which I recommend you do, then it should not be 
> too difficult to update the config on each relay one at a time, making use 
> of the load balancer. Thus enabling you to add/remove Kapacitor instances 
> dynamically without downtime.  Depending on the frequency of adding and 
> removing Kapacitor instances  and the importance of isolation/redundancy 
> you can invest in making that process as flexible subscriptions. 
> > 
> > 
> > Does that help give you a direction? Do you have any further questions? 
> > 
> > 
> > As a final note, if you do run into performance issues please let us 
> know. Kapacitor is still a young product and when new use cases pop up, we 
> want to learn how we can improve Kapacitor for those types of workloads. 
> That said what you are doing here seems reasonable and within the scope of 
> what we have tested. 
> > 
> > 
> > Thanks 
> > 
> > On Friday, November 18, 2016 at 8:23:04 AM UTC-7, kraj...@gmail.com 
> wrote:I am setting up high availability influxdb setup as mentioned on 
> influxdb site. 
> > loadbalancer-->relay-->influxdbs(pri/sec) and kapacitor 
> > Though there are obvious advantages to sending real time traffic via 
> influxdbrelay to Kapacitor together with influxdbs,it takes away 
> flexibility to spin up multiple kapacitors in the environment without 
> updating relay configuration. 

[influxdb] Can't start as service on FreeBSD jail FreeNAS

2016-12-01 Thread Erik Näsström
Hi everyone

I'm having som strange problems, tried searching and asking in some other 
forums but no solution so far!

I have a FreeNAS server running 24/7 and wanted to run influxdb in a 
FreeBSD jail there to monitor my home assistant, curing chamber etc. with 
some nice graphs.
Created a FreeBSD jail and followed the instructions in the manual and 
everything seems to work until I run the

sudo service influxd onestart


After that I just get a frozen screen with the "logo" until I terminate it 
with ctrl-c




If I just run *influxd* as a command tough it starts up just fine and I can 
access the web interface etc. but as soon as my terminal window closes It 
stops ofc.
root@InfluxDB:/ # influxd

 888   .d888 888   888b.  88b.
   888d88P"  888   888  "Y88b 888  "88b
   888888888   888888 888  .88P
   888   8b.  88 888 888  888 888  888 888888 888K.
   888   888 "88b 888888 888  888  Y8bd8P' 888888 888  "Y88b
   888   888  888 888888 888  888   X88K   888888 888888
   888   888  888 888888 Y88b 888 .d8""8b. 888  .d88P 888   d88P
 888 888  888 888888  "Y8 888  888 888P"  888P"

[run] 2016/12/01 15:52:45 InfluxDB starting, version unknown, branch 
unknown, commit unknown
[run] 2016/12/01 15:52:45 Go version go1.7.3, GOMAXPROCS set to 4
[run] 2016/12/01 15:52:45 no configuration provided, using default settings
[store] 2016/12/01 15:52:45 Using data dir: /root/.influxdb/data
[filestore] 2016/12/01 15:52:45 
/root/.influxdb/data/home_assistant/autogen/6/1-1.tsm (#0) 
opened in 62.692µs
[cacheloader] 2016/12/01 15:52:45 reading file 
/root/.influxdb/wal/home_assistant/autogen/6/_5.wal, size 0
[shard] 2016/12/01 15:52:45 /root/.influxdb/data/home_assistant/autogen/6 
database index loaded in 445.72µs
[store] 2016/12/01 15:52:45 /root/.influxdb/data/home_assistant/autogen/6 
opened in 1.008893ms
[cacheloader] 2016/12/01 15:52:45 reading file 
/root/.influxdb/wal/_internal/monitor/9/_1.wal, size 4683137
[filestore] 2016/12/01 15:52:45 
/root/.influxdb/data/_internal/monitor/7/1-1.tsm (#0) 
opened in 284.13µs
[cacheloader] 2016/12/01 15:52:45 reading file 
/root/.influxdb/wal/_internal/monitor/7/_3.wal, size 0
[shard] 2016/12/01 15:52:45 /root/.influxdb/data/_internal/monitor/7 
database index loaded in 609.656µs
[store] 2016/12/01 15:52:45 /root/.influxdb/data/_internal/monitor/7 opened 
in 33.345368ms
[filestore] 2016/12/01 15:52:45 
/root/.influxdb/data/_internal/monitor/2/1-1.tsm (#0) 
opened in 8.266029ms
[cacheloader] 2016/12/01 15:52:45 reading file 
/root/.influxdb/wal/_internal/monitor/2/_00010.wal, size 0
[shard] 2016/12/01 15:52:45 /root/.influxdb/data/_internal/monitor/2 
database index loaded in 288.802µs
[store] 2016/12/01 15:52:45 /root/.influxdb/data/_internal/monitor/2 opened 
in 40.736365ms
[filestore] 2016/12/01 15:52:46 
/root/.influxdb/data/_internal/monitor/5/1-1.tsm (#0) 
opened in 11.463897ms
[cacheloader] 2016/12/01 15:52:46 reading file 
/root/.influxdb/wal/_internal/monitor/5/_5.wal, size 0
[shard] 2016/12/01 15:52:46 /root/.influxdb/data/_internal/monitor/5 
database index loaded in 418.476µs
[store] 2016/12/01 15:52:46 /root/.influxdb/data/_internal/monitor/5 opened 
in 12.352209ms
[filestore] 2016/12/01 15:52:46 
/root/.influxdb/data/_internal/monitor/1/1-1.tsm (#0) 
opened in 11.999839ms
[cacheloader] 2016/12/01 15:52:46 reading file 
/root/.influxdb/wal/_internal/monitor/1/_00010.wal, size 0
[shard] 2016/12/01 15:52:46 /root/.influxdb/data/_internal/monitor/1 
database index loaded in 153.833µs
[store] 2016/12/01 15:52:46 /root/.influxdb/data/_internal/monitor/1 opened 
in 12.485811ms
[filestore] 2016/12/01 15:52:46 
/root/.influxdb/data/home_assistant/autogen/3/3-2.tsm (#0) 
opened in 78.184409ms
[cacheloader] 2016/12/01 15:52:46 reading file 
/root/.influxdb/wal/home_assistant/autogen/3/_00010.wal, size 0
[shard] 2016/12/01 15:52:46 /root/.influxdb/data/home_assistant/autogen/3 
database index loaded in 438.502µs
[store] 2016/12/01 15:52:46 /root/.influxdb/data/home_assistant/autogen/3 
opened in 79.00244ms
[filestore] 2016/12/01 15:52:46 
/root/.influxdb/data/_internal/monitor/4/1-1.tsm (#0) 
opened in 47.801502ms
[cacheloader] 2016/12/01 15:52:46 reading file 
/root/.influxdb/wal/_internal/monitor/4/_9.wal, size 0
[shard] 2016/12/01 15:52:46 /root/.influxdb/data/_internal/monitor/4 
database index loaded in 336.037µs
[store] 2016/12/01 15:52:46 /root/.influxdb/data/_internal/monitor/4 opened 
in 48.837465ms
[store] 2016/12/01 15:57:42 /root/.influxdb/data/_internal/monitor/8 opened 
in 2.328905ms
[shard] 2016/12/01 15:57:42 /root/.influxdb/data/home_assistant/autogen/3 
database index loaded in 881.109µs
[store] 2016/12/01 15:57:42 

[influxdb] Run telegraf inside docker, how to collect net, processors input in the host?

2016-12-01 Thread jiaqing.chen
description
Now telegraf is running inside docker.I set input config to collect net, 
processor measurements, but the net and processors measurements collected is 
the docker container’s measurements which run telegraf. In fact, my mind is to 
collect that measurements on the host which the telegraf docker is running 
on.How can I fix it?
my telegraf input conf
# Get the number of processes and group them by status
[[inputs.processes]]
 # no configuration




# Read metrics about swap memory usage
[[inputs.swap]]
 # no configuration




# Read metrics about system load  uptime
[[inputs.system]]
 # no configuration




# Read metrics about network interface usage
[[inputs.net]]
 ## By default, telegraf gathers stats from any up interface (excluding 
loopback)
 ## Setting interfaces will tell it to gather these explicit interfaces,
 ## regardless of status.
 ##
 interfaces = ["eth0", "eth1"]

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/tencent_702DA616D5F90137E11AC2C9%40qq.com.
For more options, visit https://groups.google.com/d/optout.


[influxdb] CPU usage Query !

2016-12-01 Thread kmg
I'm new to influxdb.  I tried to calculate the CPU usage.

Data inserted into influxdb with 5mins interval. 

my Calculation for Every 5mins: 

CPU_usage = [ ssCpuRawUser / 
(ssCpuRawUser+ssCpuRawNice+ssCpuRawSystem+ssCpuRawIdle+ssCpuRawSoftIRQ) ] * 
100

Please share me the query for the above calculation

Here is the value inserted into influxdb:
time hostname idle   nice oid system uservalue
2016-11-29T12:02:25.278201112Z "dev.app1.local" 109864350 108493 1689895 
3204339 
2016-11-29T12:02:25.282359773Z "dev.app1.local" "ssCpuRawUser" 3204339
2016-11-29T12:02:25.286145038Z "dev.app1.local" "ssCpuRawNice" 108493
2016-11-29T12:02:25.290602074Z "dev.app1.local" "ssCpuRawSystem"   
 1689895
2016-11-29T12:02:25.294064947Z "dev.app1.local" "ssCpuRawIdle" 109864350
2016-11-29T12:02:25.297439427Z "dev.app1.local" "ssCpuRawInterrupt" 22029
2016-11-29T12:02:25.300748476Z "dev.app1.local" "ssCpuRawSoftIRQ" 71358
2016-11-29T12:02:25.303927833Z "dev.app1.local" "ssCpuRawKernel" 0
2016-11-29T12:02:25.307150225Z "dev.app1.local" "ssCpuRawWait" 59377
2016-11-29T12:07:20.890506803Z "dev.app1.local" 109892078 108526 1690392 
3205285 
2016-11-29T12:07:20.895151041Z "dev.app1.local" "ssCpuRawUser" 3205285
2016-11-29T12:07:20.898875923Z "dev.app1.local" "ssCpuRawNice" 108526
2016-11-29T12:07:20.902326522Z "dev.app1.local" "ssCpuRawSystem"   
 1690392
2016-11-29T12:07:20.905513396Z "dev.app1.local" "ssCpuRawIdle" 109892078
2016-11-29T12:07:20.90856002Z "dev.app1.local" "ssCpuRawInterrupt" 22042
2016-11-29T12:07:20.911568897Z "dev.app1.local" "ssCpuRawSoftIRQ" 71392
2016-11-29T12:07:20.914664004Z "dev.app1.local" "ssCpuRawKernel" 0
2016-11-29T12:07:20.917818936Z "dev.app1.local" "ssCpuRawWait" 59390


-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/20c75b6c-041d-4d26-949c-f90ea0e84e75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.