Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-6710

[Insight-metrics] changing fields type from string to integer or float

XMLWordPrintable

    • Icon: Feature Feature
    • Resolution: Done
    • Icon: Major Major
    • fuse-6.x-GA
    • jboss-fuse-6.3
    • None
    • 0
    • 0% 0%
    • Todo

      insight-metrics creates an index with all fields to String, In order to explore this data and to visualize it (e.g; with Kibana) we have to change the mapping of some fields like ExchangeCompleted from String to Integer.

      {
         "insight-2017.04.03": {
            "mappings": {
               "sta-camel": {
                  "dynamic_templates": [
                     {
                        "string_fields": {
                           "mapping": {
                              "index": "analyzed",
                              "omit_norms": true,
                              "type": "string",
                              "fields": {
                                 "raw": {
                                    "ignore_above": 9216,
                                    "index": "not_analyzed",
                                    "type": "string"
                                 }
                              }
                           },
                           "match": "*",
                           "match_mapping_type": "string"
                        }
                     }
                  ],
                  "properties": {
                     "@timestamp": {
                        "type": "date",
                        "format": "dateOptionalTime"
                     },
                     "@version": {
                        "type": "string",
                        "index": "not_analyzed"
                     },
                     "geoip": {
                        "dynamic": "true",
                        "properties": {
                           "location": {
                              "type": "geo_point"
                           }
                        }
                     },
                     "host": {
                        "type": "string",
                        "norms": {
                           "enabled": false
                        },
                        "fields": {
                           "raw": {
                              "type": "string",
                              "index": "not_analyzed",
                              "ignore_above": 9216
                           }
                        }
                     },
                     "log-example-context": {
                        "properties": {
                           "routes": {
                              "properties": {
                                 "log-route": {
                                    "properties": {
                                       "ExchangesCompleted": {
                                          "type": "string",
                                          "norms": {
                                             "enabled": false
                                          },
                                          "fields": {
                                             "raw": {
                                                "type": "string",
                                                "index": "not_analyzed",
                                                "ignore_above": 9216
                                             }
                                          }
                                       },
                                       "ExchangesFailed": {
                                          "type": "string",
                                          "norms": {
                                             "enabled": false
                                          },
                                          "fields": {
                                             "raw": {
                                                "type": "string",
                                                "index": "not_analyzed",
                                                "ignore_above": 9216
                                             }
                                          }
                                       },
                                       "ExchangesTotal": {
                                          "type": "string",
                                          "norms": {
                                             "enabled": false
                                          },
                                          "fields": {
                                             "raw": {
                                                "type": "string",
                                                "index": "not_analyzed",
                                                "ignore_above": 9216
                                             }
                                          }
                                       },
                                       "ExternalRedeliveries": {
                                          "type": "string",
                                          "norms": {
                                             "enabled": false
                                          },
                                          "fields": {
                                             "raw": {
                                                "type": "string",
                                                "index": "not_analyzed",
                                                "ignore_above": 9216
                                             }
                                          }
                                       },
                                       "FailuresHandled": {
                                          "type": "string",
                                          "norms": {
                                             "enabled": false
                                          },
                                          "fields": {
                                             "raw": {
                                                "type": "string",
                                                "index": "not_analyzed",
                                                "ignore_above": 9216
                                             }
                                          }
                                       },
                                       "InflightExchanges": {
                                          "type": "string",
                                          "norms": {
                                             "enabled": false
                                          },
                                          "fields": {
                                             "raw": {
                                                "type": "string",
                                                "index": "not_analyzed",
                                                "ignore_above": 9216
                                             }
                                          }
                                       },
                                       "Load01": {
                                          "type": "string",
                                          "norms": {
                                             "enabled": false
                                          },
                                          "fields": {
                                             "raw": {
                                                "type": "string",
                                                "index": "not_analyzed",
                                                "ignore_above": 9216
                                             }
                                          }
                                       },
                                       "Load05": {
                                          "type": "string",
                                          "norms": {
                                             "enabled": false
                                          },
                                          "fields": {
                                             "raw": {
                                                "type": "string",
                                                "index": "not_analyzed",
                                                "ignore_above": 9216
                                             }
                                          }
                                       },
                                       "Load15": {
                                          "type": "string",
                                          "norms": {
                                             "enabled": false
                                          },
                                          "fields": {
                                             "raw": {
                                                "type": "string",
                                                "index": "not_analyzed",
                                                "ignore_above": 9216
                                             }
                                          }
                                       },
                                       "MaxProcessingTime": {
                                          "type": "string",
                                          "norms": {
                                             "enabled": false
                                          },
                                          "fields": {
                                             "raw": {
                                                "type": "string",
                                                "index": "not_analyzed",
                                                "ignore_above": 9216
                                             }
                                          }
                                       },
                                       "MeanProcessingTime": {
                                          "type": "string",
                                          "norms": {
                                             "enabled": false
                                          },
                                          "fields": {
                                             "raw": {
                                                "type": "string",
                                                "index": "not_analyzed",
                                                "ignore_above": 9216
                                             }
                                          }
                                       },
                                       "MinProcessingTime": {
                                          "type": "string",
                                          "norms": {
                                             "enabled": false
                                          },
                                          "fields": {
                                             "raw": {
                                                "type": "string",
                                                "index": "not_analyzed",
                                                "ignore_above": 9216
                                             }
                                          }
                                       },
                                       "Redeliveries": {
                                          "type": "string",
                                          "norms": {
                                             "enabled": false
                                          },
                                          "fields": {
                                             "raw": {
                                                "type": "string",
                                                "index": "not_analyzed",
                                                "ignore_above": 9216
                                             }
                                          }
                                       },
                                       "TotalProcessingTime": {
                                          "type": "string",
                                          "norms": {
                                             "enabled": false
                                          },
                                          "fields": {
                                             "raw": {
                                                "type": "string",
                                                "index": "not_analyzed",
                                                "ignore_above": 9216
                                             }
                                          }
                                       }
                                    }
                                 }
                              }
                           }
                        }
                     }
                  }
               }
            }
         }
      }
      

              pantinor@redhat.com Paolo Antinori
              rhn-support-aboucham Abel Bouchama
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: