2

I installed Opsview using this guide. The problem is that REST API does not work.

Executing:

/usr/local/nagios/bin/opsview_rest --username=admin \
--password=password GET config/host

results in:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head>
<title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The
requested URL /rest was not found on this server.</p> <hr>
<address>Apache/2.2.15 (CentOS) Server at localhost Port 80</address>
</body></html>

Goto undefined subroutine &Carp::shortmess_real at
/usr/share/perl5/Carp.pm line 41.

I assume that the issue was caused by some Apache settings.

masegaloeh
  • 18,236
  • 10
  • 57
  • 106
JustAGuy
  • 639
  • 3
  • 23
  • 38

1 Answers1

1

It does not mention this in the documentation but REST API should always point at the actual web port of Opsview.

Changing localhost by adding Opsview's default web port to localhost:3000 in /usr/local/nagios/bin/opsview_rest solved the issue.

030
  • 5,901
  • 13
  • 68
  • 110
JustAGuy
  • 639
  • 3
  • 23
  • 38