This commit is contained in:
2026-04-04 00:09:02 +08:00
commit 38e896363e
117 changed files with 119311 additions and 0 deletions

View File

@@ -0,0 +1,165 @@
package main
type biosInfo struct {
Name string `json:"name"`
}
type operatingSystem struct {
OsRelease string `json:"os_name"`
AstraVersion string `json:"astra_version"`
AstraLicense string `json:"astra_license"`
}
type installedPackage struct {
Name string `json:"name"`
Version string `json:"version"`
}
type fsInfo struct {
MountPointDevice string `json:"mount_point_devices"`
MountPointOsPath string `json:"mount_point_os_path"`
MountPointSize uint64 `json:"mount_point_size"`
MountPointFree uint64 `json:"mount_point_free"`
}
type loadAverage struct {
OneMin string `json:"la_onemin"`
FiveMin string `json:"la_fivemin"`
FifteenMin string `json:"la_fifteenmin"`
Processes string `json:"la_processes"`
}
// type cpu struct {
// Model []string `json:"model"`
// }
type cpu struct {
VendorId string `json:"vendor_id"`
CpuFamily string `json:"cpu_family"`
Model string `json:"model"`
ModelName string `json:"model_name"`
Stepping string `json:"stepping"`
Microcode string `json:"microcode"`
CpuMhz string `json:"cpu_mhz"`
CacheSize string `json:"cache_size"`
PhysicalId string `json:"phusical_id"`
CpuCores string `json:"cpu_cores"`
Flags string `json:"flags"`
Bugs string `json:"bugs"`
Bogomips string `json:"bogomips"`
TlbSize string `json:"tlb_size"`
ClflushSize string `json:"clflush_size"`
CacheAlignment string `json:"cache_alignment"`
AddressSize string `json:"address_size"`
PowerManagement string `json:"power_management"`
}
type ram struct {
MemTotal string `json:"mem_total"`
MemFree string `json:"mem_free"`
MemAvailable string `json:"mem_available"`
}
type uptime struct {
WorkSeconds string `json:"work_seconds"`
}
type timeService struct {
TimeService string `json:"time_service"`
TimeSync string `json:"time_sync"`
}
type journalctlEntry struct {
Timestamp string `json:"__REALTIME_TIMESTAMP"`
CommandLine string `json:"_CMDLINE"`
CommandName string `json:"_COMM"`
SyslogIdentifier string `json:"SYSLOG_IDENTIFIER"`
Message string `json:"MESSAGE"`
}
type firewalls struct {
Ufw string `json:"ufw"`
Nftables string `json:"nftables"`
Iptables string `json:"iptables"`
Firewalld string `json:"firewalld"`
}
type netInterface struct {
Device string `json:"device"`
Flags string `json:"flags"`
HwAddr string `json:"hardware_address"`
IpAddr []string `json:"ip_addr"`
Index string `json:"index"`
MTU string `json:"mtu"`
}
type networkConfig struct {
NetInterfaces []netInterface `json:"net_interfaces"`
NetworkManager string `json:"networkmanager"`
NetworkManagerConn []string `json:"networkmanager_conn"`
Networking string `json:"networking"`
EtcHosts []string `json:"etc_hosts"`
}
type internetResource struct {
Name string `json:"name"`
Http string `json:"http"`
Https string `json:"https"`
IpList string `json:"ip_list"`
}
type secSetALSE struct {
Apparmor string `json:"apparmor"`
Selinux string `json:"selinux"`
Parsec string `json:"parsec"`
Mic string `json:"astra_mic"`
Mac string `json:"astra_mac"`
Digsig string `json:"digsig"`
Sudo string `json:"sudo"`
Nochmodx string `json:"nochmodx"`
Interpret string `json:"interpret"`
SudoersAstraAdmin string `json:"sudoers_astraadmin"`
SudoersSudo string `json:"sudoers_sudo"`
AstraAdmin string `json:"astra-admin"`
}
type secSetUbuntu struct {
Apparmor string `json:"apparmor"`
}
type secSetAlma struct {
Selinux string `json:"selinux"`
}
type dockerPs struct {
Id string `json:"id"`
Image string `json:"image"`
Names []string `json:"names"`
Created int64 `json:"running_for"`
State string `json:"state"`
Status string `json:"status"`
// Health string `json:"health"`
}
type dockerStats struct {
BlockIO string `json:"BlockIO"`
CPUPerc string `json:"CPUPerc"`
Container string `json:"Container"`
ID string `json:"ID"`
MemPerc string `json:"MemPerc"`
MemUsage string `json:"MemUsage"`
Name string `json:"Name"`
NetIO string `json:"NetIO"`
PIDs string `json:"PIDs"`
}
type dockerSupervisor struct {
Id string `json:"id"`
Name string `json:"name"`
SupStatus string `json:"sup_status"`
}
type rootHistoryCommand struct {
Id int `json:"id"`
ExecutionTime string `json:"excution_time"`
Command string `json:"command"`
}