Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XPack helper for naming monitoring indices #7586

Merged
merged 5 commits into from
Jul 13, 2018

Conversation

ycombinator
Copy link
Contributor

This PR adds a helper method for generating monitoring index names for a given product (Elasticsearch, Kibana, etc.).

// a given product { elasticsearch, kibana, logstash, beats }
func MakeMonitoringIndexName(product Product) string {
today := time.Now().UTC().Format("2006.01.02")
const version = "6"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some way to look up metricbeat's major version at runtime? Then we can remove this hardcoding here. Otherwise we'll have to remember to update it manually every major release.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is part of the beat.Infotype but it's not global :-( Let's hard code it for now but add a TODO / note here.

// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this license (and the one in xpack.go) the right one to use?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@ycombinator ycombinator force-pushed the xpack/monitoring/index-naming branch from 04f7c68 to dfa6a18 Compare July 12, 2018 18:28
// a given product { elasticsearch, kibana, logstash, beats }
func MakeMonitoringIndexName(product Product) string {
today := time.Now().UTC().Format("2006.01.02")
const version = "6"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is part of the beat.Infotype but it's not global :-( Let's hard code it for now but add a TODO / note here.

// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@ruflin ruflin merged commit 5344049 into elastic:master Jul 13, 2018
@ycombinator ycombinator added needs_backport PR is waiting to be backported to other branches. v6.4.0 labels Jul 13, 2018
@ycombinator ycombinator deleted the xpack/monitoring/index-naming branch July 13, 2018 15:42
@ycombinator ycombinator removed the needs_backport PR is waiting to be backported to other branches. label Jul 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants