[修改]修改了时间配置的变量对应,添加了supervisor启动配置,增加了Prometheus对应的confd模版
This commit is contained in:
@@ -23,19 +23,19 @@ class ManageTime extends SettingsPage
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
TextInput::make('global_time')
|
||||
TextInput::make('global_scrape_interval')
|
||||
->label('默认拉取时间')
|
||||
->required()
|
||||
->suffix("s"),
|
||||
TextInput::make('node_exporter_time')
|
||||
TextInput::make('node_exporter_scrape_interval')
|
||||
->label('系统监控时间间隔')
|
||||
->required()
|
||||
->suffix("s"),
|
||||
TextInput::make('opcua_time')
|
||||
->label('配置读取时间')
|
||||
TextInput::make('opcua_scrape_interval')
|
||||
->label('opcua_exporter抓取间隔')
|
||||
->required()
|
||||
->suffix("s"),
|
||||
TextInput::make('prometheus_time')
|
||||
TextInput::make('storage_interval')
|
||||
->label('数据存储时间')
|
||||
->required()
|
||||
->suffix("h"),
|
||||
|
||||
@@ -6,14 +6,14 @@ use Spatie\LaravelSettings\Settings;
|
||||
|
||||
class TimeSettings extends Settings
|
||||
{
|
||||
// 默认拉取时间
|
||||
public ?string $global_time;
|
||||
// 系统扫描时间
|
||||
public ?string $node_exporter_time;
|
||||
// 系统配置时间
|
||||
public ?string $opcua_time;
|
||||
# 全局抓取间隔
|
||||
public ?string $global_scrape_interval;
|
||||
// node_exporter抓取间隔
|
||||
public ?string $node_exporter_scrape_interval;
|
||||
// opcua_exporter抓取间隔
|
||||
public ?string $opcua_scrape_interval;
|
||||
// 数据存储时间
|
||||
public ?string $prometheus_time;
|
||||
public ?string $storage_interval;
|
||||
|
||||
public static function group(): string
|
||||
{
|
||||
|
||||
@@ -7,9 +7,9 @@ return new class extends SettingsMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
$this->migrator->add('time.global_time', '');
|
||||
$this->migrator->add('time.node_exporter_time', '');
|
||||
$this->migrator->add('time.opcua_time', '');
|
||||
$this->migrator->add('time.prometheus_time', '');
|
||||
$this->migrator->add('time.global_scrape_interval', '');
|
||||
$this->migrator->add('time.node_exporter_scrape_interval', '');
|
||||
$this->migrator->add('time.opcua_scrape_interval', '');
|
||||
$this->migrator->add('time.storage_interval', '');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user