Timelion code doesn't output graph, but line graph does!

Question:

How can I use Timelion visualization to show multiple line graphs at the same time?

Timelion code:

.es(index=stage-api-athena*, timefield=capture_time, metric=sum:tomato_count, metric=count).range(min=0, max=1000)

Note: I don't use Timestamp, I use capture_time and upload_time instead. Also, count is basically the same as row_captured.

My index mapping:

{
  "stage-api-athena" : {
    "mappings" : {
      "properties" : {
        "@timestamp" : {
          "type" : "date"
        },
        "@version" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "capture_time" : {
          "type" : "date",
          "format" : "YYYY-MM-dd HH:mm:ss"
        },
        "color" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "customer_id" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "customer_name" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "direction" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "duration_hour" : {
          "type" : "long"
        },
        "farm_id" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "farm_name" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "firmware_version" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "hardware_version" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "is_customer_active" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "is_machine_active" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "machine_id" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "machine_type" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "phase_id" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "phase_name" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "phase_status" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "record_type" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "row_captured" : {
          "type" : "long"
        },
        "row_number" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "row_session_id" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "tomato_count" : {
          "type" : "long"
        },
        "type" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "upload_time" : {
          "type" : "date",
          "format" : "YYYY-MM-dd HH:mm:ss"
        },
        "uuid" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "version" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        }
      }
    }
  }
}

Kibana output after Timelion code:

Bump

Can you try and make the interval of the search more exact? I think Timelion can be set to skip last bucket, maybe missing all your data. Also, could you show an example on how the data should look with a Line Graph from the kibana visualizations?

I ended up using Timelion on a different index in a different example, but I will still share the code in case someone might use it.

.es(index=stage-cloudwatch*, q='cloudwatch_logs.log_group: "/aws/lambda/b2_raw_processor", message:"PROCESS-START"',metric=count, timefield=@timestamp).color(red).title(Invocations).label(b2_raw_processor), 
.es(index=stage-cloudwatch*,q='cloudwatch_logs.log_group: "/aws/lambda/b2_s3_writer", message:"PROCESS-START"',metric=count, timefield=@timestamp).color(green).title(Invocations).label(b2_s3_writer),
.es(index=stage-cloudwatch*,q='cloudwatch_logs.log_group: "/aws/lambda/b2_record_processor", message:"PROCESS-START"',metric=count, timefield=@timestamp).color(orange).title(Invocations).label(b2_record_processor),
.es(index=stage-cloudwatch*,q='cloudwatch_logs.log_group: "/aws/lambda/b2_fast_access_worker", message:"PROCESS-START"',metric=count, timefield=@timestamp).color(blue).title(Invocations).label(b2_fast_access_worker),
.es(index=stage-cloudwatch*,q='cloudwatch_logs.log_group: "/aws/lambda/b2_live_model_trigger", message:"PROCESS-START"',metric=count, timefield=@timestamp).color(purple).title(Invocations).label(b2_live_model_trigger),
.es(index=stage-cloudwatch*,q='cloudwatch_logs.log_group: "/aws/lambda/s_data_worker", message:"PROCESS-START"',metric=count, timefield=@timestamp).color(yellow).legend(columns=1, position=ne).title(Invocations).label(s_data_worker)

Index map:

{
  "stage-cloudwatch" : {
    "mappings" : {
      "properties" : {
        "@timestamp" : {
          "type" : "date"
        },
        "@version" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "cloudwatch_logs" : {
          "properties" : {
            "event_id" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "ingestion_time" : {
              "type" : "date"
            },
            "log_group" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            },
            "log_stream" : {
              "type" : "text",
              "fields" : {
                "keyword" : {
                  "type" : "keyword",
                  "ignore_above" : 256
                }
              }
            }
          }
        },
        "message" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "type" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        }
      }
    }
  }
}

Note: This code is not for the example above!

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