Skip to content

Commit

Permalink
Revert "Add creation_date metrics (prometheus-community#816)"
Browse files Browse the repository at this point in the history
This reverts commit ca87f5f.
  • Loading branch information
jaimeyh authored Jun 14, 2024
1 parent 6c24229 commit 48808f1
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ Further Information
| elasticsearch_indices_search_query_total | counter | 1 | Total number of queries |
| elasticsearch_indices_segments_count | gauge | 1 | Count of index segments on this node |
| elasticsearch_indices_segments_memory_bytes | gauge | 1 | Current memory size of segments in bytes |
| elasticsearch_indices_settings_creation_timestamp_seconds | gauge | 1 | Timestamp of the index creation in seconds |
| elasticsearch_indices_settings_stats_read_only_indices | gauge | 1 | Count of indices that have read_only_allow_delete=true |
| elasticsearch_indices_settings_total_fields | gauge | | Index setting value for index.mapping.total_fields.limit (total allowable mapped fields in a index) |
| elasticsearch_indices_settings_replicas | gauge | | Index setting value for index.replicas |
Expand Down
16 changes: 0 additions & 16 deletions collector/indices_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ type IndicesSettings struct {
var (
defaultIndicesTotalFieldsLabels = []string{"index"}
defaultTotalFieldsValue = 1000 //es default configuration for total fields
defaultDateCreation = 0 //es index default creation date
)

type indicesSettingsMetric struct {
Expand Down Expand Up @@ -106,21 +105,6 @@ func NewIndicesSettings(logger log.Logger, client *http.Client, url *url.URL) *I
return val
},
},
{
Type: prometheus.GaugeValue,
Desc: prometheus.NewDesc(
prometheus.BuildFQName(namespace, "indices_settings", "creation_timestamp_seconds"),
"index setting creation_date",
defaultIndicesTotalFieldsLabels, nil,
),
Value: func(indexSettings Settings) float64 {
val, err := strconv.ParseFloat(indexSettings.IndexInfo.CreationDate, 64)
if err != nil {
return float64(defaultDateCreation)
}
return val / 1000.0
},
},
},
}
}
Expand Down
1 change: 0 additions & 1 deletion collector/indices_settings_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ type IndexInfo struct {
Blocks Blocks `json:"blocks"`
Mapping Mapping `json:"mapping"`
NumberOfReplicas string `json:"number_of_replicas"`
CreationDate string `json:"creation_date"`
}

// Blocks defines whether current index has read_only_allow_delete enabled
Expand Down

0 comments on commit 48808f1

Please sign in to comment.