- include SMB drop-ins from /etc/samba/smb.conf.d into the generated smb.conf - keep smbd/nfs-server running while other services (/etc/exports.d, drop-ins) share, instead of disabling them when nasmon has no shares of its own - list those shares read-only on /shares - settings: RepoISO URL; poll its /api/integration/status, dashboard card, menu link, alerts for portal down, stale worker, failed jobs, unmounted publications Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -40,15 +40,23 @@ type SelfTests struct {
|
||||
Hour int `json:"hour"` // local hour of day when tests may be started
|
||||
}
|
||||
|
||||
// Integrations links nasmon with other services on the same host.
|
||||
type Integrations struct {
|
||||
// RepoISOURL is the RepoISO portal base URL nasmon polls for health
|
||||
// (e.g. http://127.0.0.1); empty disables the integration.
|
||||
RepoISOURL string `json:"repoiso_url"`
|
||||
}
|
||||
|
||||
type Settings struct {
|
||||
SMTP SMTP `json:"smtp"`
|
||||
AlertsEnabled bool `json:"alerts_enabled"`
|
||||
NotifyResolved bool `json:"notify_resolved"`
|
||||
RemindHours int `json:"remind_hours"`
|
||||
SmartIntervalMin int `json:"smart_interval_min"`
|
||||
SmartSkipStandby bool `json:"smart_skip_standby"`
|
||||
Thresholds Thresholds `json:"thresholds"`
|
||||
SelfTests SelfTests `json:"self_tests"`
|
||||
SMTP SMTP `json:"smtp"`
|
||||
AlertsEnabled bool `json:"alerts_enabled"`
|
||||
NotifyResolved bool `json:"notify_resolved"`
|
||||
RemindHours int `json:"remind_hours"`
|
||||
SmartIntervalMin int `json:"smart_interval_min"`
|
||||
SmartSkipStandby bool `json:"smart_skip_standby"`
|
||||
Thresholds Thresholds `json:"thresholds"`
|
||||
SelfTests SelfTests `json:"self_tests"`
|
||||
Integrations Integrations `json:"integrations"`
|
||||
}
|
||||
|
||||
func Defaults() Settings {
|
||||
@@ -102,6 +110,11 @@ func (s *Settings) Validate() error {
|
||||
if s.SelfTests.ShortDays < 0 || s.SelfTests.LongDays < 0 {
|
||||
return errors.New("self-test periods must be >= 0")
|
||||
}
|
||||
u := strings.TrimRight(strings.TrimSpace(s.Integrations.RepoISOURL), "/")
|
||||
if u != "" && !strings.HasPrefix(u, "http://") && !strings.HasPrefix(u, "https://") {
|
||||
return errors.New("RepoISO URL must start with http:// or https://")
|
||||
}
|
||||
s.Integrations.RepoISOURL = u
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user