-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
XPack helper for naming monitoring indices #7586
Conversation
// a given product { elasticsearch, kibana, logstash, beats } | ||
func MakeMonitoringIndexName(product Product) string { | ||
today := time.Now().UTC().Format("2006.01.02") | ||
const version = "6" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.Info
type 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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
04f7c68
to
dfa6a18
Compare
// a given product { elasticsearch, kibana, logstash, beats } | ||
func MakeMonitoringIndexName(product Product) string { | ||
today := time.Now().UTC().Format("2006.01.02") | ||
const version = "6" |
There was a problem hiding this comment.
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.Info
type 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
This PR adds a helper method for generating monitoring index names for a given product (Elasticsearch, Kibana, etc.).