A
A
abl_12017-04-27 20:15:40
linux
abl_1, 2017-04-27 20:15:40

How does XENSERVER monitor?

How does XENSERVER monitor via Zabbix?
Are there any manuals, templates?
I would like to monitor the server itself and see the VMs that are spinning there.
XenServer 6.5 and Zabbix 3.2
What can you advise

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Armenian Radio, 2017-04-27
@gbg

Nagios.

V
v_fadeev, 2017-12-16
@v_fadeev

#!/usr/bin/perl -w
 
use strict;
 
# declare...
sub trim($);
 
# we need to run 2 itterations because CPU stats show 0% on the first, and I'm putting .1 second betwen them to speed it up
my @result = split(/\n/, `xentop -b -i 2 -d.1`);
 
# remove the first line
shift(@result);
 
# this looks for the start of the 2nd output section
foreach my $line (@result)
{
  if ($line =~ m/^xentop - /)
  {
    last;
  }
  shift(@result);
}
 
 
# the next 1 !!! lines are headings..
#shift(@result);
#shift(@result);
shift(@result);
 
foreach my $line (@result)
{
  my @xenInfo = split(/[\t ]+/, trim($line));
  printf("name: %s, cpu_sec: %d, cpu_percent: %.2f, vbd_rd: %d, vbd_wr: %d\n",
    $xenInfo[0],
    $xenInfo[2],
    $xenInfo[3],
    $xenInfo[14],
    $xenInfo[15]
    );
}
 
# trims leading and trailing whitespace
sub trim($)
{
  my $string = shift;
  $string =~ s/^\s+//;
  $string =~ s/\s+$//;
  return $string;
}

Then on my own somehow.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question