# Add series to measurement(prometheus)

**URL:** <https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997>\
**Category:** Store\
**Tags:** time-series\
**Created:** [May 2, 2018, 7:53am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997 "2018-05-02T07:53:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ardel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ardel/32/2827_2.png) [@ardel](https://community.influxdata.com/u/ardel)\
**Post date:** [May 2, 2018, 7:53am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/1 "2018-05-02T07:53:40Z")

</div>

Hello All,

We have prometheus that gathers data and store them in influxdb. However, when I execute ‘SHOW MEASUREMENTS’, I am not seeing any but when I execute ‘SHOW SERIES’ I can see thousands of entry.

I was trying to use INTO in the query but it requires measurement and in my case, I can see nothing. Please help me on how can I do this?

PS - I am new to influxdb

---

<div class="post-metadata">

**Author:** ![dmuiruri](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/dmuiruri/32/1297_2.png) [@dmuiruri](https://community.influxdata.com/u/dmuiruri)\
**Post date:** [May 2, 2018, 8:10am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/2 "2018-05-02T08:10:23Z")

</div>

Wouldn’t you need to select the database in the show measurements query (show measurements on db) or set the database prior to the show query (using “use db”)?

---

<div class="post-metadata">

**Author:** ![ardel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ardel/32/2827_2.png) [@ardel](https://community.influxdata.com/u/ardel)\
**Post date:** [May 2, 2018, 8:36am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/3 "2018-05-02T08:36:46Z")

</div>

Hello dmuiruri,

before I execute show mesurement, I first execute use

steps I performed:

1. USE 
2. SHOW MEASUREMENTS --\>nothing shows
3. SHOW SERIES --\> I can see thousands of entry

What I need is to remove/delete series

---

<div class="post-metadata">

**Author:** ![dmuiruri](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/dmuiruri/32/1297_2.png) [@dmuiruri](https://community.influxdata.com/u/dmuiruri)\
**Post date:** [May 2, 2018, 8:55am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/4 "2018-05-02T08:55:40Z")

</div>

Ok, the db would anyway ask you to set the database.

Well, consider to show a sample input of the line protocol or some output of the indicated series, anything that could help someone reproduce the error.

---

<div class="post-metadata">

**Author:** ![zqq](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/zqq/32/1298_2.png) [@zqq](https://community.influxdata.com/u/zqq)\
**Post date:** [May 2, 2018, 8:56am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/5 "2018-05-02T08:56:17Z")

</div>

I had encountered a problem that is opposite to yours. It’s related to retention policy.  
I write to self-defined retention policy(not default one).  
Show series shows nothing; Show measurement show the measurement I write to.

---

<div class="post-metadata">

**Author:** ![ardel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ardel/32/2827_2.png) [@ardel](https://community.influxdata.com/u/ardel)\
**Post date:** [May 2, 2018, 9:23am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/6 "2018-05-02T09:23:26Z")

</div>

Here’s the sample output for ‘SHOW SERIES’. I removed the values for company rules

\_, **name** =up,az=ap-northeast-1c,domain=\<removed\_value\>,env=\<removed\_value\>,job=Process(Linux),name=\<removed\_value\>,private\_ip=\<removed\_value\>,role=csr,service=\<removed\_value\>,subnet\_id=,subnet-c376bc98,,system=\<removed\_value\>,vpc\_id=\<removed\_value\>

Here’s for ‘SHOW MEASUREMENTS’

> SHOW MEASUREMENTS  
> name: measurements  
> name

* * *

---

<div class="post-metadata">

**Author:** ![ardel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ardel/32/2827_2.png) [@ardel](https://community.influxdata.com/u/ardel)\
**Post date:** [May 2, 2018, 9:24am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/7 "2018-05-02T09:24:24Z")

</div>

zqq,

Did you resolve that issue?

---

<div class="post-metadata">

**Author:** ![dmuiruri](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/dmuiruri/32/1297_2.png) [@dmuiruri](https://community.influxdata.com/u/dmuiruri)\
**Post date:** [May 2, 2018, 10:19am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/8 "2018-05-02T10:19:37Z")

</div>

In the show series results you posted how many series are those: two series, one or more? I would think that the dumped result would show something like each series for single line.

Additionally it seems the line starts with an underscore which begs the question if the name of the series is omitted by design or that’s part of the “invisibility”.

---

<div class="post-metadata">

**Author:** ![dmuiruri](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/dmuiruri/32/1297_2.png) [@dmuiruri](https://community.influxdata.com/u/dmuiruri)\
**Post date:** [May 2, 2018, 10:23am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/9 "2018-05-02T10:23:24Z")

</div>

On a second look seems like one series, are there any other series and do all start with the underscore?

---

<div class="post-metadata">

**Author:** ![ardel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ardel/32/2827_2.png) [@ardel](https://community.influxdata.com/u/ardel)\
**Post date:** [May 2, 2018, 10:27am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/10 "2018-05-02T10:27:13Z")

</div>

dmuiruri,

How can I count the number of series. If what I showed will count as one then there are thousands of series

For the underscore, I honestly don’t know if it’s by design or not because it’s already setup before I use the influxDB

Should a measurement automatically created if prometheus writes data to influxdb?

---

<div class="post-metadata">

**Author:** ![dmuiruri](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/dmuiruri/32/1297_2.png) [@dmuiruri](https://community.influxdata.com/u/dmuiruri)\
**Post date:** [May 2, 2018, 10:35am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/11 "2018-05-02T10:35:37Z")

</div>

The position of the underscore is where the name of the measurement would appear following the show series command. So the underscore and the empty show measurement results seem to point towards the same issue…measurement name.

The db shouldn’t allow an empty string for a measurement name, nonetheless worthwhile to check if those names are what you expect them to be.

---

<div class="post-metadata">

**Author:** ![zqq](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/zqq/32/1298_2.png) [@zqq](https://community.influxdata.com/u/zqq)\
**Post date:** [May 2, 2018, 10:38am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/12 "2018-05-02T10:38:41Z")

</div>

No.  
It seems that show series of default retention policy.

---

<div class="post-metadata">

**Author:** ![ardel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ardel/32/2827_2.png) [@ardel](https://community.influxdata.com/u/ardel)\
**Post date:** [May 2, 2018, 10:43am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/13 "2018-05-02T10:43:18Z")

</div>

dmuiruri

so for example the series has \_ec2 instance in the beginning. Are you saying that when I execute ‘SHOW MEASUREMENTS’ command I should see “ec2 instasnce”.

Should the measurement autmatically created?

---

<div class="post-metadata">

**Author:** ![dmuiruri](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/dmuiruri/32/1297_2.png) [@dmuiruri](https://community.influxdata.com/u/dmuiruri)\
**Post date:** [May 2, 2018, 10:50am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/14 "2018-05-02T10:50:29Z")

</div>

Indeed, a series is generated from a given measurement, there wouldn’t be a series if a measurement with that series did not exist.

If a measurement has X unique tag values, then X series will be generated from that particular measurement.

---

<div class="post-metadata">

**Author:** ![ardel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ardel/32/2827_2.png) [@ardel](https://community.influxdata.com/u/ardel)\
**Post date:** [May 2, 2018, 10:55am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/15 "2018-05-02T10:55:20Z")

</div>

dmuiruri

Do you mean, that I should create a measurement first before series is created?  
Apologies, I just want to make it clear 🙂

---

<div class="post-metadata">

**Author:** ![ardel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ardel/32/2827_2.png) [@ardel](https://community.influxdata.com/u/ardel)\
**Post date:** [May 2, 2018, 11:05am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/16 "2018-05-02T11:05:16Z")

</div>

By the way, in the result of my command \_,\_name. the measurement is empty because comma follows underscore?

---

<div class="post-metadata">

**Author:** ![dmuiruri](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/dmuiruri/32/1297_2.png) [@dmuiruri](https://community.influxdata.com/u/dmuiruri)\
**Post date:** [May 2, 2018, 11:07am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/17 "2018-05-02T11:07:07Z")

</div>

When creating the input to the database say in the line protocol, the measurement name is that first item in this case “payment”

> insert payment,device=mobile,product=Notepad,method=credit billed=33,licenses=3i 1434067467100293230

insert another line to the db with a different value in the billing “method”

> insert payment,device=mobile,product=Notepad,method=cash billed=33,licenses=3i 1434067467100293230

After a few entries, the result would be a measurement table looking as follows as (not so well formatted):

> name: payment  
> time billed device licenses method product
> 
> * * *
> 
> 2015-06-12T00:04:27.10029323Z 33 mobile 3 Gold Notepad  
> 2015-06-12T00:04:27.10029323Z 33 mobile 3 credit Notepad  
> 2015-06-12T00:04:27.10029323Z 33 mobile 3 cash Notepad  
> 2015-06-12T00:04:27.10029323Z 40 mobile 3 bitcoin Notepad

Show series would show

> payment,device=mobile,method=Gold,product=Notepad  
> payment,device=mobile,method=bitcoin,product=Notepad  
> payment,device=mobile,method=cash,product=Notepad  
> payment,device=mobile,method=credit,product=Notepad

show measurements

> payment

---

<div class="post-metadata">

**Author:** ![ardel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ardel/32/2827_2.png) [@ardel](https://community.influxdata.com/u/ardel)\
**Post date:** [May 4, 2018, 3:18am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/18 "2018-05-04T03:18:32Z")

</div>

Hello dmuiruri,

Say for example, I successfully inserted a measurement(payment) manually in the influxdb. My question is, what will happen to the points that will be written next from prometheus to influxdb. Will the points automatically be written into the measurement(payment)?

---

<div class="post-metadata">

**Author:** ![dmuiruri](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/dmuiruri/32/1297_2.png) [@dmuiruri](https://community.influxdata.com/u/dmuiruri)\
**Post date:** [May 4, 2018, 8:00am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/19 "2018-05-04T08:00:04Z")

</div>

They should be written, particularly so if they record the same measurement (payment).

However, I’m not sure what is meant by “automatically”, the database and measurement name must be indicated correctly to influxdb.

I am still puzzled by what is the measurement name in your earlier sample of the db entry, could it be that your measurement name is an an underscore ( \_ )? and in that case, listing measurements would show an underscore.

---

<div class="post-metadata">

**Author:** ![ardel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ardel/32/2827_2.png) [@ardel](https://community.influxdata.com/u/ardel)\
**Post date:** [May 4, 2018, 8:40am UTC](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997/20 "2018-05-04T08:40:43Z")

</div>

Hello dmuiruri

Finally understand it. Yes, the measurement name is an underscore(\_). Though another problem occurred.

When I execute a sample query:  
select \* from “autogen”."\_" where “az” = “ap-northeast-1c”

There’s no result at all

[Next page](https://community.influxdata.com/t/add-series-to-measurement-prometheus/4997.md?page=2)
