/* ** Copyright (C) 2001-2025 Zabbix SIA ** ** This program is free software: you can redistribute it and/or modify it under the terms of ** the GNU Affero General Public License as published by the Free Software Foundation, version 3. ** ** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; ** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ** See the GNU Affero General Public License for more details. ** ** You should have received a copy of the GNU Affero General Public License along with this program. ** If not, see . **/ package main import ( "errors" "fmt" "os" "golang.zabbix.com/plugin/postgresql/plugin" "golang.zabbix.com/sdk/plugin/container" "golang.zabbix.com/sdk/plugin/flag" "golang.zabbix.com/sdk/zbxerr" ) const COPYRIGHT_MESSAGE = // `Copyright (C) 2025 Zabbix SIA License AGPLv3: GNU Affero General Public License version 3 . This is free software: you are free to change and redistribute it according to the license. There is NO WARRANTY, to the extent permitted by law.` const ( PLUGIN_VERSION_MAJOR = 7 PLUGIN_VERSION_MINOR = 2 PLUGIN_VERSION_PATCH = 15 //nolint:revive PLUGIN_VERSION_RC = "rc1" //nolint:revive ) func main() { err := flag.HandleFlags( plugin.Name, os.Args[0], COPYRIGHT_MESSAGE, PLUGIN_VERSION_RC, PLUGIN_VERSION_MAJOR, PLUGIN_VERSION_MINOR, PLUGIN_VERSION_PATCH, ) if err != nil { if !errors.Is(err, zbxerr.ErrorOSExitZero) { panic(fmt.Sprintf("failed to handle flags %s", err.Error())) } return } h, err := container.NewHandler(plugin.Impl.Name()) if err != nil { panic(fmt.Sprintf("failed to create plugin handler %s", err.Error())) } plugin.Impl.Logger = h err = h.Execute() if err != nil { panic(fmt.Sprintf("failed to execute plugin handler %s", err.Error())) } }