PostgreSQL loadable plugin
Source
14
14
** See the License for the specific language governing permissions and
15
15
** limitations under the License.
16
16
**/
17
17
18
18
package plugin
19
19
20
20
import (
21
21
"context"
22
22
"errors"
23
23
24
-
"git.zabbix.com/ap/plugin-support/zbxerr"
25
24
"github.com/jackc/pgx/v4"
25
+
"golang.zabbix.com/sdk/zbxerr"
26
26
)
27
27
28
28
// archiveHandler gets info about count and size of archive files and returns JSON if all is OK or nil otherwise.
29
29
func archiveHandler(ctx context.Context, conn PostgresClient,
30
30
_ string, _ map[string]string, _ ...string) (interface{}, error) {
31
31
var archiveCountJSON, archiveSizeJSON string
32
32
33
33
queryArchiveCount := `SELECT row_to_json(T)
34
34
FROM (
35
35
SELECT archived_count, failed_count