3

Is there anyway to print out Nagios Service/Host UP Time Percentage? e.g. PHP Class, Command Line Tools or ...

Zim3r
  • 580
  • 2
  • 14
  • 36

3 Answers3

2

Use Nagios::Report Perl module for generating report on percentage total time service OK http://metacpan.org/pod/Nagios::Report

szabgab
  • 6,202
  • 11
  • 50
  • 64
MangeshBiradar
  • 3,820
  • 1
  • 23
  • 41
  • 1
    Thank you, I've used this before, but Nagios::Report produces a full report. Is there anyway to get the exact value? – Zim3r Jan 17 '13 at 12:01
  • Similar question: http://stackoverflow.com/questions/14281396/how-to-print-out-nagios-service-up-time-percentage-from-nagios-report-perl-modul/14291579#14291579 – MangeshBiradar Jan 17 '13 at 12:11
  • That question is about using Nagios::Report to get exact value, but this is about Any way to print out Nagios Service UP Time Percentage. – Zim3r Jan 17 '13 at 12:25
2

Refer This Perl script:

https://github.com/MangeshBiradar/Check_mk/blob/master/nagios_report.pl

Hope This could answer your question.

MangeshBiradar
  • 3,820
  • 1
  • 23
  • 41
0

I used Curl to fetch the Nagios CGIs content and PHP DomDocument Class to fetch the uptime.

Zim3r
  • 580
  • 2
  • 14
  • 36