Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8955567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:35:28+00:00 2026-06-15T14:35:28+00:00

Anyone knows or have used Monit::HTTP module for perl connection to monit daemon through

  • 0

Anyone knows or have used Monit::HTTP module for perl connection to monit daemon through HTTP?

I am trying to use Monit::HTTP module for perl and I have some troubles.
I cannot retrieve status variable, for example, monit status command give me Status = Running for some services that i have running in my system but Monit::HTTP all time give me Status=0.
I try to stop a service with monit stop command and i know that process was killed but Monit::HTTP give me Status = 0 for this in the same way.
In that last case the Status = 0 mean “service stopped” or “service running”?

My code excerpt to retrieve performance data from my system monitored by monit daemon:

my @systems = $hd->get_services(TYPE_SYSTEM);
foreach my $system (@systems) {
  print "system: $system\n";
  my $hash_ref = $hd->service_status($system);
...

In this last case i cannot retrieve good data from monit (look for undef data in the next hash_ref dump which was obtained with Data::Dumper module), for example Monit::HTTP return:

system: xpto
$VAR1 = {
   'cpu' => {
       'percent' => undef,
       'percenttotal' => undef },
    'status' => '0',
    'name' => 'xpto',
    'children'=> undef,
    'monitor' => '1',
    'host' => 'localhost',
    'memory'=> {
        'percent' => undef,
        'kilobytetotal' => undef,
        'kilobyte' => undef,
        'percenttotal' => undef },
    'group' => undef,
    'pid' => undef;
    'ppid' => undef;
    'uptime' => undef;
    'type'=> '5';
    'load' => {
        'avg05' => undef,
        'avg01' => undef,
        'avg15' => undef },
    'pendingaction' => '0',
};

And monit status command return:

System 'xpto'
status                Running
monitoring status     Monitored
load average          [1.25] [1.16] [0.94]
cpu                   8.7%us 7.4%sy
memory usage          3202164 kB [76.3%]
swap usage            1589248 kB [75.7%]
data collected        Thu, 06 Dec 2012 11:50:55

My code excerpt to retrieve performance data from my processes (for example, apache process) monitored by monit daemon:

my @systems = $hd->get_services(TYPE_PROCESS);
foreach my $system (@systems) {
    print "system: $system\n";
    my $hash_ref = $hd->service_status($system);
...

Thanks for all your support.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:35:29+00:00Added an answer on June 15, 2026 at 2:35 pm

    Monit::HTTP connects via HTTP protocol to Monit. Did you checked that Monit is accepting HTTP connection and you script connects to the right parameters?

    wget -nd -v -O – –user username –password password — http://:/_status?format=xml

    But maybe the problem more trivial? You asked for TYPE_PROCESS and you get your response: ‘type’=> ‘5’;

    If you need all types you should do the following: (a contans in the moddule like TYPE_ALL=-1 would be more user friendly)

    my @systems = $hd->get_services(-1);
    foreach my $system (@systems) {
        print "system: $system\n";
        my $hash_ref = $hd->service_status($system);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Dose anyone knows why I have to use -use-network=false in my Flex Builder?!?!?! This
Anyone knows of some good Unicode tutorials with examples in C? I have to
Have a rather simple question. Does anyone knows if i can use jparallax both
Is there anyone who knows this? I have been trying this for the last
Does anyone have any advice how to write such app? Or maybe knows some
I'm wondering if anyone knows how to accomplish the following: Let's say I have
I was wondering if anyone knows an easy way to do this. I have
I have a multidimensional array with mutexes, and I use them so some critical
I have used Spotify for some time now and I thought it was a
Does anyone know there have any other way that (by not using json_encode and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.