Skip to content
/ ula Public

This is a http server to save logs to es and query log.

License

Notifications You must be signed in to change notification settings

ultlog/ula

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ultlog-api

The abbreviation of ultlog-api is ula, which is a http server to save logs to es and query log.

文档 / ultlog-ui / collector / searcher

Need

Requires Elasticsearch which version is 7.x .

Create Index

curl -XPUT  -H 'Content-Type: application/json' localhost:9200/ult_index -d@data.json
json.data

{
    "mappings" : {
      "properties" : {
        "acceptTime" : {
          "type" : "long"
        },
        "createTime" : {
          "type" : "long"
        },
        "level" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "message" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "text"
            }
          }
        },
        "module" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "project" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "stack" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "text"
            }
          }
        },
        "uuid" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        }
      }
    },
    "settings":{}
}

Install

Download

clickthis to download ula.jar.

Run

java -jar -D"ultlog.es.address.host={es-ip}" -D"ultlog.es.address.port={es-port}"   ula-0.0.1.jar

Replace es-ip and es-port.

Config

If you need to modify the configuration information such as port, ip.You can add it in the startup item.

-Dspring.port=8888

Or create a configuration file in the same level directory, it is more convenient to modify the configuration.