
#                                      Copyright 2025 WebPros International, LLC
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited.

package Cpanel::Config::ConfigObj::Driver::ServerMonitoring;

use cPstrict;

*VERSION = \$Cpanel::Config::ConfigObj::Driver::ServerMonitoring::META::VERSION;

use Cpanel::Exception         ();
use Cpanel::LoadModule        ();
use Cpanel::Config::ConfigObj ();
use Try::Tiny;
use Cpanel::Config::ConfigObj::Driver::ServerMonitoring::META ();

use parent qw(
  Cpanel::Config::ConfigObj::Interface::Config::v1
  Cpanel::Config::ConfigObj::Interface::Whostmgr
);

sub init {
    my ( $class, $software_obj ) = @_;

    my $defaults = {
        'settings'      => {},
        'thirdparty_ns' => "",
    };

    my $self = $class->SUPER::base( $defaults, $software_obj );

    return $self;
}

sub enable {
    my ($self) = @_;
    require Whostmgr::360Monitoring::Setup;
    return Whostmgr::360Monitoring::Setup::local_enable();
}

sub disable {
    my ($self) = @_;
    require Whostmgr::360Monitoring::Setup;
    return Whostmgr::360Monitoring::Setup::local_disable();
}

sub info {
    my ($self) = @_;
    return $self->meta()->abstract();
}

sub check {
    my ($self) = @_;
    return 1;
}

1;
