Skip to content

Commit

Permalink
[INLONG-10387][Audit] update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
doleyzi committed Jun 14, 2024
1 parent d94e2b3 commit b86f8fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
7 changes: 2 additions & 5 deletions inlong-audit/audit-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ which can ensure that each module is reconciled in accordance with the unified a
- The Audit SDK will summarize the results according to the cycle
and send them to the ip:port list set by the interface.
- There are two ways to set the address of the Audit Proxy, configure the address directly or get the address from the manager. Please choose one of the methods.

#### Configure Audit Proxy Addresses by fixed ip:port
If the ip:port of the AuditProxy is fixed, then this interface needs to be called once.
If the AuditProxy changes in real time, then the business program needs to call this interface periodically to update
If the AuditProxy changes in real time, then the business program needs to call this interface periodically to update.
```java
HashSet<String> ipPortList = new HashSet<>();
ipPortList.add("0.0.0.0:54041");
AuditOperator.getInstance().setAuditProxy(ipPortList);
```
#### Configure Audit Proxy Addresses by InLong Manager
By configuring the InLong Manager's address, module information, and manager certification information,
The Audit SDK will automatically fetch the Manager to obtain the address of the Audit Proxy.
Expand Down Expand Up @@ -65,7 +65,6 @@ public enum AuditComponent {
Call the add method for statistics, where the auditID parameter uniquely identifies an audit object,
inlongGroupID,inlongStreamID,logTime are audit dimensions, count is the number of items, size is the size, and logTime
is milliseconds.
#### Example for Agent to Add Audit Data
```java
AuditOperator.getInstance().add(auditID, auditTag, inlongGroupID, inlongStreamID, logTime,
Expand All @@ -78,7 +77,6 @@ The scenario of supplementary recording of agent data, so the version number par
count, size, auditVersion);
```
The scenario of supplementary recording of DataProxy data, so the version number parameter needs to be passed in.
#### Example for Sort Flink to Add Audit Data
```java
AuditReporterImpl auditReporter=new AuditReporterImpl();
Expand All @@ -97,7 +95,6 @@ The scenario of supplementary recording of DataProxy data, so the version number
logTime, count, size, auditVersion)
```
In order to ensure the accuracy of auditing, each operator needs to create an auditAuditReporterImpl instance.
- Explain of AuditDimensions

| parameter | description |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import static org.apache.inlong.audit.entity.AuditType.POSTGRES;
import static org.apache.inlong.audit.entity.AuditType.SDK;
import static org.apache.inlong.audit.entity.AuditType.STARROCKS;
import static org.apache.inlong.audit.entity.AuditType.TUBE_MQ;
import static org.apache.inlong.audit.entity.AuditType.TUBEMQ;
import static org.apache.inlong.audit.entity.FlowType.INPUT;
import static org.apache.inlong.audit.entity.FlowType.OUTPUT;

Expand Down Expand Up @@ -91,8 +91,8 @@ public enum AuditIdEnum {
SORT_BINLOG_INPUT(35, INPUT, BINLOG, "Received Audit Metrics for Sort Binlog"),
SORT_BINLOG_OUTPUT(36, OUTPUT, BINLOG, "Sent Audit Metrics for Sort Binlog"),

SORT_TUBE_INPUT(33, INPUT, TUBE_MQ, "Received Audit Metrics for Sort Tube"),
SORT_TUBE_OUTPUT(34, OUTPUT, TUBE_MQ, "Sent Audit Metrics for Sort Tube"),
SORT_TUBE_INPUT(33, INPUT, TUBEMQ, "Received Audit Metrics for Sort TubeMQ"),
SORT_TUBE_OUTPUT(34, OUTPUT, TUBEMQ, "Sent Audit Metrics for Sort TubeMQ"),

SORT_MYSQL_INPUT(35, INPUT, MYSQL, "Received Audit Metrics for Sort MySQL"),
SORT_MYSQL_OUTPUT(36, OUTPUT, MYSQL, "Sent Audit Metrics for Sort MySQL"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public enum AuditType {
KUDU("Kudu"),
POSTGRES("Postgres"),
BINLOG("MYSQL_BINLOG"),
TUBE_MQ("TubeMQ"),
TUBEMQ("TubeMQ"),
MYSQL("MYSQL_SQL"),
HDFS("HDFS");

Expand Down

0 comments on commit b86f8fd

Please sign in to comment.