# .net client application log not creating index in elasticsearch

**URL:** <https://discuss.elastic.co/t/net-client-application-log-not-creating-index-in-elasticsearch/321259>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [December 15, 2022, 6:48am UTC](https://discuss.elastic.co/t/net-client-application-log-not-creating-index-in-elasticsearch/321259 "2022-12-15T06:48:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajvel](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@rajvel](https://discuss.elastic.co/u/rajvel)\
**Post date:** [December 15, 2022, 6:48am UTC](https://discuss.elastic.co/t/net-client-application-log-not-creating-index-in-elasticsearch/321259/1 "2022-12-15T06:48:01Z")

</div>

Hello Team,

we have .net application we used .net client elasticsearch to share the log to new index.

Recently we haven't received any new index created by .net application. there is no way to find the whether the index received or not.

The old index which was created before that is receiving logs continuously, but the new one not working.

Please help us to fix the issue.

---

<div class="post-metadata">

**Author:** ![stevejgordon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stevejgordon/32/80912_2.png) [@stevejgordon](https://discuss.elastic.co/u/stevejgordon)\
**Post date:** [December 15, 2022, 10:08am UTC](https://discuss.elastic.co/t/net-client-application-log-not-creating-index-in-elasticsearch/321259/2 "2022-12-15T10:08:52Z")

</div>

Hi, @rajvel.

You haven't provided enough context to provide any advice here. Are you creating the new index using the client and indexing documents? Can you share some code? Documents will be indexed to the index name you provide for the index/bulk/etc. methods you call. If the old index is continuing to receive new documents, have you ensured that you have specified the new index name when ingesting the data?

---

<div class="post-metadata">

**Author:** ![rajvel](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@rajvel](https://discuss.elastic.co/u/rajvel)\
**Post date:** [December 15, 2022, 10:31am UTC](https://discuss.elastic.co/t/net-client-application-log-not-creating-index-in-elasticsearch/321259/3 "2022-12-15T10:31:11Z")

</div>

Hello Steve,

The below is the format we have configured to send the application which was hosted on .Net to elasticsearch.  
Most of the application uses serilog.

Is it possible to check whether the index creation is disabled or not via API.

```auto
"EINDEX": "test_log",
    "ETOKEN": "123455XXXXXXX==",
    "EURL": "http://test-dev.only.com:9200/",

.WriteTo.Elasticsearch(
                new ElasticsearchSinkOptions(new Uri(configuration["ApplicationSettings:EURL"].ToString()))
                {
                    AutoRegisterTemplate = true,
                    IndexFormat = configuration["ApplicationSettings:EINDEX"].ToString(),
                    TypeName = null,
                    BatchAction = ElasticOpType.Create,
                    ModifyConnectionSettings = (c) =>
                    {
                        c.ServerCertificateValidationCallback(
                        (o, certificate, arg3, arg4) => { return true; });
                        c.GlobalHeaders(new NameValueCollection { { "Authorization", "ApiKey " + configuration["ApplicationSettings:ETOKEN"].ToString() } });
                        return c;
                    }
                }
                )

```

---

<div class="post-metadata">

**Author:** ![stevejgordon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stevejgordon/32/80912_2.png) [@stevejgordon](https://discuss.elastic.co/u/stevejgordon)\
**Post date:** [December 15, 2022, 2:33pm UTC](https://discuss.elastic.co/t/net-client-application-log-not-creating-index-in-elasticsearch/321259/4 "2022-12-15T14:33:23Z")

</div>

@rajvel You're using the `Serilog.Sinks.Elasticsearch` library, a third-party logging library not owned or supported by Elastic. Therefore, you'd be best placed to raise questions within[the repo](https://github.com/serilog-contrib/serilog-sinks-elasticsearch) or potentially somewhere more general, such as StackOverflow.

Based on a cursory look, I'd expect your logs to be indexed into an index named "test\_log" per your configuration. It doesn't include a placeholder for any other dynamic information for the index name.

---

<div class="post-metadata">

**Author:** ![rajvel](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@rajvel](https://discuss.elastic.co/u/rajvel)\
**Post date:** [December 15, 2022, 4:41pm UTC](https://discuss.elastic.co/t/net-client-application-log-not-creating-index-in-elasticsearch/321259/5 "2022-12-15T16:41:38Z")

</div>

Thanks for your time.

The specified index need to be created but in my case its not happening.

For the same application if the application team forwarded the log its visible.

I am suspecting there is some cluster setting blocked to create a new indices.  
COuld you please share is there any command to check on the cluster status.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 12, 2023, 4:42pm UTC](https://discuss.elastic.co/t/net-client-application-log-not-creating-index-in-elasticsearch/321259/6 "2023-01-12T16:42:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
