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

2016-12-02 Thread Vick Khera
FreeBSD standard is to put it in /var/db but the port doesn't do it. I changed 
the config file. 

> On Dec 2, 2016, at 10:49, Erik Näsström  wrote:
> 
> Sweet, never knew where to look for it earlier, had a permission error when 
> it was trying to create /var/lib/
> Probably not the right way to do it but a chmod -R 777 /var sorted the 
> problem! :D
> 
>> Den torsdag 1 december 2016 kl. 20:45:26 UTC+1 skrev 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 a topic in the Google 
> Groups "InfluxData" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/influxdb/4UjaB287am8/unsubscribe.
> To unsubscribe from this group and all its topics, 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/2009f21a-7429-42f9-95b9-3baaa4990dcd%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/4A1E33E3-63DF-42DD-BBB9-1797B270C0B3%40khera.org.
For more options, visit https://groups.google.com/d/optout.


[influxdb] sum of rate

2016-12-02 Thread ihashu
hi

sum of derivative() rather than derivative(sum(value),10s)?
I wonder if influxdb could have sum of rate opiton.

Thanks
Shu

-- 
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/0fbedbac-dc1f-4898-bf99-c24b6fc3f4c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[influxdb] Install Influxdb to raspberry pi

2016-12-02 Thread vaghar
Hello,

I am trying to install version 0.9.6.1 of the Influxdb on my Raspberry Pi 
3. I followed instructions from here: http://www.lindleyhome.com/?p=88

When I ran "./package.sh -t deb -p 0.9.6.1", I got this error: 
 /main.go:5:2: can't find package "context" in any of:
I looked inside version 1.5.3 of go and there is no "context" package. I 
searched the go github and found that version 1.7 of go has the "context" 
package. Then I downloaded go1.7 and followed the same instructions in the 
above link no I am getting different errors when I run the "./package.sh 
" command:

package golang.org/x/crypto/ssh/terminal: unrecognized import path "
golang.org/x/crypto/ssh/terminal" (https fetch: Get 
https://golang.org/x/crypto/ssh/terminal?go-get=1: dial tcp: lookup 
golang.org on 192.168.7.254:53: dial udp 192.168.7.254:53: i/o timeout)

package golang.org/x/crypto/bcrypt: unrecognized import path "
golang.org/x/crypto/bcrypt" (https fetch: Get 
https://golang.org/x/crypto/bcrypt?go-get=1: dial tcp: lookup golang.org on 
192.168.7.254:53: dial udp 192.168.7.254:53: i/o timeout)

package collectd.org/api: unrecognized import path "collectd.org/api" 
(https fetch: Get https://collectd.org/api?go-get=1: dial tcp: lookup 
collectd.org on 192.168.7.254:53: dial udp 192.168.7.254:53: i/o timeout)

package collectd.org/network: unrecognized import path "collectd.org/network" 
(https fetch: Get https://collectd.org/network?go-get=1: dial tcp: lookup 
collectd.org on 192.168.7.254:53: dial udp 192.168.7.254:53: i/o timeout)

WARNING: failed to 'go get' packages.

M package.sh

Already on 'master'

Your branch is up-to-date with 'origin/master'.

cmd/influx/cli/cli.go:22:2: cannot find package "
golang.org/x/crypto/ssh/terminal" in any of:

/home/pi/.gvm/gos/go1.7/src/golang.org/x/crypto/ssh/terminal (from $GOROOT)

/home/pi/.gvm/pkgsets/go1.7/influxdb/src/golang.org/x/crypto/ssh/terminal 
(from $GOPATH)

/home/pi/.gvm/pkgsets/go1.7/global/src/golang.org/x/crypto/ssh/terminal

services/collectd/service.go:16:2: cannot find package "collectd.org/api" 
in any of:

/home/pi/.gvm/gos/go1.7/src/collectd.org/api (from $GOROOT)

/home/pi/.gvm/pkgsets/go1.7/influxdb/src/collectd.org/api (from $GOPATH)

/home/pi/.gvm/pkgsets/go1.7/global/src/collectd.org/api

services/collectd/service.go:17:2: cannot find package "collectd.org/network" 
in any of:

/home/pi/.gvm/gos/go1.7/src/collectd.org/network (from $GOROOT)

/home/pi/.gvm/pkgsets/go1.7/influxdb/src/collectd.org/network (from $GOPATH)

/home/pi/.gvm/pkgsets/go1.7/global/src/collectd.org/network

services/meta/client.go:23:2: cannot find package "
golang.org/x/crypto/bcrypt" in any of:



Any help to resolve these issue is appreciated.


P.S. I know there is a prebuilt influxdb ARM on the website. But that is 
veriosn 1.1.0.


Thanks, Shahriar

-- 
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/5ab5441e-c35c-41ca-9e38-98924c11d659%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[influxdb] Re: Are time series within a result from a select statement guaranteed to be in any particular order?

2016-12-02 Thread Travis Keep
I had hypothesized that time series are ordered by name first and then 
ordered by the tags hash key using the HashKey() method in models/points.go.

To test my hypothesis, I used tag foo=hello.there on one time series and 
tag foo=hello there on another and named the time series the same. The time 
series with tag foo=hello.there appeared after the one with tag foo=hello 
there.

Since the HashKey() function escapes the ' ' with '\ ', I would have 
expected 'hello there' to come after 'hello.there' not before.


On Friday, December 2, 2016 at 9:00:02 AM UTC-8, Travis Keep wrote:
>
> I am using influx 0.13.0
>
> If I run a query like the following from within the influx client:
>
> select mean(value) from /process/ where time >= now() - 40m and time < 
> now() - 20m group by host, time(5m)
>
> I see four time series shown in the following order:
>
>
> *name: process_atags: host=apple*
> timemean
> 
> 14806404000
> 14806401000
> 148063980005303.000749873667
> 148063950005303.0006949655
> 148063920005303.000645723
>
>
> *name: process_atags: host=butter*
> timemean
> 
> 14806404000
> 14806401000
> 148063980005268.000403206001
> 148063950005268.0003494635
> 148063920005268.0003098444995
>
>
> *name: process_btags: host=apple*
> timemean
> 
> 14806404000
> 14806401000
> 148063980005773.000883236
> 148063950005773.0008339935
> 148063920005773.000784001
>
>
> *name: process_btags: host=butter*
> timemean
> 
> 14806404000
> 14806401000
> 148063980004598.000522668
> 148063950004598.0004695515
> 148063920004598.000431057
>
>
> Note the order of the time series. They are ordered first by the time 
> series name and second by the time series 'host' tag value.  
>
> If I were to add ' order by time desc' to my query, the time series 
> themselves would show in reverse order in addition to their times being in 
> reverse order.
>
>
>
>
>
>
> *Question: Can I safely make any assumptions about the order of time 
> series within a result set?Question: Do current influx db clients such as 
> the go client library make any assumptions about the order of time series 
> within a result set?*
>

-- 
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/2fe5e123-11b5-48be-a7c5-0b7677c430ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[influxdb] Chronograf Connecting to Influx with Self-Signed Cert

2016-12-02 Thread ralph
We have an InfluxDB running and using a self-signed cert. We can successfully 
push stats into it using Telegraf, which uses a self-signed cert too.

However, Chronograf won't connect to the InfluxDB instance. We can turn SSL on, 
but it just says:

Get https://api:@myserver:8086/query?q=SHOW+SERIES+WHERE+FALSE: x509: 
certificate signed by unknown authority

Is there a way for me to convince Chronograf to use my CA Cert to verify the 
cert in influxdb, or else ignore cert issues? (the latter is something of a 
workaround, but works for me as both Chronograf and Influx happen to be on the 
same box right now)

I'm running these versions (RPMs installed onto Centos 7):

chronograf-1.0.0-1.x86_64
telegraf-1.1.1-1.x86_64
influxdb-1.1.0-1.x86_64

At the moment, I'm facing putting Influx behind Nginx (which will do the SSL), 
and having Chronograf connect without SSL directly to Influx. That will work, 
but it's a bit of a shame.

Any ideas/help would be much appreciated,

...Ralph

-- 
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/849dcc00-3519-420b-a67c-e90c6062c192%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [influxdb] influxdb python tutorial not working

2016-12-02 Thread Ross McDonald
What if you set the RP to infinite? You'll want to change the "3d" to "inf":

```
client.create_retention_policy(retention_policy, 'inf', 3, default=True)
```

On Thu, Dec 1, 2016 at 5:42 PM,  wrote:

> On Thursday, December 1, 2016 at 2:13:39 PM UTC-8, Ross McDonald wrote:
> > 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+u...@googlegroups.com.
> >
> > To post to this group, send email to infl...@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.
>
> Thanks.
> I have it.
>
>
> print("Create a retention policy")
> retention_policy = 'server_data'
> client.create_retention_policy(retention_policy, '3d', 3,
> default=True)
>
> print("Write points #: {0}".format(total_records))
> client.write_points(series, time_precision='s',
> retention_policy=retention_policy)
>
> time.sleep(1)
>
> #query = "SELECT MEAN(value) FROM {} WHERE time > now() - 10d GROUP BY
> time(500m)".format(metric)
> query = "SELECT MEAN(value) FROM {}".format(metric)
> result = client.query(query, database=DBNAME)
> print(result)
> print("Result: {0}".format(result))
>
> The result is still empty.
>
> --
> 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/f197875b-2820-490b-90b2-51b3d2e16a9c%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/CAD8sRLCkf5DV092H5%3DPs8LPMu%3DjrmL3%3DyQZtX%3D6Nd0onACm0Ew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[influxdb] Re: CPU usage Query !

2016-12-02 Thread kmg

I checked the docs and tried multiple queries. Final I stopped at this 
stage.

select sum(value)  from ucd_cpu where hostname='localhost' and oid=~ 
/^ssCpuRaw*/ and time > '2016-09-18T22:47:53.408149394Z' and time < 
'2016-09-18T22:52:53.531283581Z' group by time(5m)
this query just sum all the 5mins value. shows correct output.

Then I moved to next stage by dividing ssCpuRawUser value by above sum 
output, the below query I tried, but return empty output
select mean(ssCpuRawUser.value) / sum(value)  from ucd_cpu where 
hostname='localhost' and oid=~ /^ssCpuRaw*/ and time > 
'2016-09-18T22:47:53.408149394Z' and time < 
'2016-09-18T22:52:53.531283581Z' group by time(5m)

Kindly someone help me on this

On Thursday, 1 December 2016 18:55:03 UTC+5:30, kmg wrote:
>
> 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/e5ebfff9-e227-47a0-9659-9bbc91a91172%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.