# 存储数据结构

SmartPing采用Sqlite进行数据存储，且数据结构非常简单，如果需要二次开发且对数据库操作比较熟悉，可以直接在此取数据

打开SmartPing的Sqlite数据库后可以看到，SmartPing总共三张表

* pinglog
* alertlog
* mappinglog

## pinglog

pinglog数据表存储正向Ping数据

```
CREATE TABLE pinglog (
    logtime  VARCHAR (16),
    target   VARCHAR (15),
    maxdelay FLOAT,
    mindelay FLOAT,
    avgdelay FLOAT,
    sendpk   INT,
    revcpk   INT,
    losspk   INT
);
```

## alertlog

alertlog存储报警信息

```
CREATE TABLE alertlog (
    logtime    VARCHAR (16),
    targetip   VARCHAR (16),
    targetname VARCHAR (15),
    tracert    TEXT
);
```

## mappinglog

mappinglog存储全国延迟检测信息

```
CREATE TABLE mappinglog (
    logtime DATETIME,
    mapjson TEXT
);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.smartping.org/arch/data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
