Skip to main content

Hello,

I would try centreon to monitoring AS400 ibm i server but i have many troubleshooting.

I can ping my host AS400 with the base_host_alive command.

I have IBM AS400 Connector installed.

I try to create a CPU service with OS-AS400-CPU command for an host but he have an unknown status with (No output returned from plugin).

Someone can help us ?

Best Regards

 

 

Hi, 

Did you follow this documentation: https://docs.centreon.com/pp/integrations/plugin-packs/procedures/operatingsystems-as400-connector/ ?

Most of the time, it means that the plugin isn’t installed on the poller. Doublecheck command within this section: https://docs.centreon.com/pp/integrations/plugin-packs/procedures/operatingsystems-as400-connector/#setup

 

Cheers,​​​


hi, 

All this is okay and now i have  Cannot decode response.

With  a debug option add i have an html return :

 
Statut détaillé

UNKNOWN: Cannot decode response (add --debug option to display returned content)

======> request send

POST http://localhost:80/

Accept: application/json

User-Agent: centreon::plugins::backend::http::useragent

Content-Type: application/json

{"password":"pass","command":"listDisks","login":"user","host":"10.157.222.42"}

======> response done

HTTP/1.1 302 Found

Connection: Keep-Alive

Date: Mon, 13 Jun 2022 12:46:37 GMT

Location: http://localhost/centreon

Server: Apache

Content-Length: 209

Content-Type: text/html; charset=iso-8859-1

Client-Date: Mon, 13 Jun 2022 12:46:37 GMT

Client-Peer: 127.0.0.1:80

Client-Response-Num: 1

Keep-Alive: timeout=5, max=100

Title: 302 Found

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>302 Found</title>

</head><body>

<h1>Found</h1>

<p>The document has moved <a href="http://localhost/centreon">here</a>.</p>

</body></html>

======> request send

GET http://localhost/centreon

Accept: application/json

User-Agent: centreon::plugins::backend::http::useragent

======> response done

HTTP/1.1 301 Moved Permanently

Date: Mon, 13 Jun 2022 12:46:37 GMT

Location: http://localhost/centreon/

Server: Apache

Content-Length: 234

Content-Type: text/html; charset=iso-8859-1

Client-Date: Mon, 13 Jun 2022 12:46:37 GMT

Client-Peer: 127.0.0.1:80

Client-Response-Num: 2

Title: 301 Moved Permanently

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>301 Moved Permanently</title>

</head><body>

<h1>Moved Permanently</h1>

<p>The document has moved <a href="http://localhost/centreon/">here</a>.</p>

</body></html>

======> request send

GET http://localhost/centreon/

Accept: application/json

User-Agent: centreon::plugins::backend::http::useragent

======> response done

HTTP/1.1 302 Found

Cache-Control: no-store, no-cache, must-revalidate

Date: Mon, 13 Jun 2022 12:46:37 GMT

Pragma: no-cache

Location: ./install/upgrade.php

Server: Apache

Content-Type: text/html; charset=UTF-8

Expires: Thu, 19 Nov 1981 08:52:00 GMT

Client-Date: Mon, 13 Jun 2022 12:46:37 GMT

Client-Peer: 127.0.0.1:80

Client-Response-Num: 3

Client-Transfer-Encoding: chunked

Link: <./Themes/Centreon-2/login.css>; rel="stylesheet"; type="text/css"

Link: <./img/favicon.ico>; rel="shortcut icon"

Refresh: 840

Set-Cookie: PHPSESSID=c812idsc8c70t257cbruimfvdd; path=/;HttpOnly;SameSite=Strict

Title: Centreon - IT & Network Monitoring

X-Frame-Options: sameorigin

X-Meta-Generator: Centreon - Copyright (C) 2005 - 2021 Open Source Matters. All rights reserved.

X-Meta-Robots: index, nofollow

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Centreon - IT & Network Monitoring</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<meta name="Generator" content="Centreon - Copyright (C) 2005 - 2021 Open Source Matters. All rights reserved." />

<meta name="robots" content="index, nofollow" />

<meta http-equiv="refresh" content="840">

<link href="./Themes/Centreon-2/login.css" rel="stylesheet" type="text/css">

<link rel="shortcut icon" href="./img/favicon.ico">

<script type="text/javascript" src="./include/common/javascript/jquery/jquery.min.js"></script>

</head>

<body OnLoad="document.login.useralias.focus();">

<form action="./index.php" method="post" name="login" style="height:370px">

<div class="login_wrapper">

<div class="LoginInvitLogo">

<div class="error_msg" style="visibility: hidden">

<span class='msg'></span>

</div>

<img src="img/centreon.png" alt="Centreon Logo" title="Centreon Logo" />

</div>

<div class="logintab">

<table id="logintab1" style="text-align:center;" align="center">

<tr>

<td align='right'></td>

<td><input placeholder="Login" class="inputclassic" autocomplete="off" name="useralias" type="text" /></td>

</tr>

<tr>

<td align='right'></td>

<td><input placeholder="Password" class="inputclassicPass" name="password" type="password" /></td>

</tr>

<tr>

<td colspan="2" align='center'><input class="btc bt_info" name="submitLogin" value="Connect" type="submit" /></td>

</tr>

</table>

</div>

<div class="LoginInvitVersion">

<span id="LoginInvitcpy">

&copy; <a href="mailto:contact@centreon.com">Centreon</a> 2005 - 2021

</span>

<br>

<span>

v. 21.10.4

</span>

</div>

</div>

<input name="centreon_token" type="hidden" value="c95eecc30d5bc7f4474007d36247abe8" />

</form>

 

<script type="text/javascript">

jQuery(() => {

jQuery('formrname="login"]').submit(() => {

jQuery('inputytype="submit"]').prop('disabled', true)

jQuery.ajax({

url: './authentication/providers/configurations/local',

data: JSON.stringify({

login: jQuery('inputyname="useralias"]').val(),

password: jQuery('inputyname="password"]').val()

}),

method: 'POST',

contentType: 'application/json'

}).done((res) => {

window.location.href = res.redirect_uri

}).fail((err) => {

if (err.status === 401) {

if (err?.responseJSON?.message) {

jQuery('span.msg').text(err.responseJSON.message)

} else {

jQuery('span.msg').text('Your credentials are incorrect')

}

} else {

jQuery('span.msg').text('Internal server error')

}

jQuery('div.error_msg').css('visibility', '')

}).always(() => {

jQuery('inputytype="submit"]').prop('disabled', false)

})

return false;

});

});

if (window.location.href.match(/\/index.php\?disconnect=1/)) {

localStorage.removeItem('centreonPlatformData');

}

// check :

// - if login page is in an iframe

// - if iframe url is login page with disconnect parameter

if (window.location.href !== window.parent.location.href

&& window.location.href.match(/\/index.php\?disconnect=1/)

) {

// send event to be manage by react app (redirect to login page)

var event = new CustomEvent(

'react.href.disconnect',

{

detail: {

href: window.location.href

}

}

);

window.parent.dispatchEvent(event);

}

</script>

 

</body>

</html>

======> request send

GET http://localhost/centreon/install/upgrade.php

Accept: application/json

User-Agent: centreon::plugins::backend::http::useragent

======> response done

HTTP/1.1 200 OK

Cache-Control: no-store, no-cache, must-revalidate

Date: Mon, 13 Jun 2022 12:46:37 GMT

Pragma: no-cache

Server: Apache

Content-Type: text/html; charset=UTF-8

Expires: Thu, 19 Nov 1981 08:52:00 GMT

Client-Date: Mon, 13 Jun 2022 12:46:37 GMT

Client-Peer: 127.0.0.1:80

Client-Response-Num: 4

Client-Transfer-Encoding: chunked

Content-Style-Type: text/css

Link: <../img/favicon.ico>; rel="shortcut icon"

Link: <../Themes/Centreon-2/style.css>; rel="stylesheet"; type="text/css"

Link: <./install.css>; rel="stylesheet"; type="text/css"

Link: <./pub_install.css>; rel="stylesheet"; type="text/css"

Set-Cookie: PHPSESSID=4dqgkrfi7e5c9mub6vpf3u367h; path=/;HttpOnly;SameSite=Strict

Title: Centreon Installation

X-Frame-Options: sameorigin

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<meta http-equiv="Content-Style-Type" content="text/css">

<title>Centreon Installation</title>

<link rel="shortcut icon" href="../img/favicon.ico">

<link rel="stylesheet" href="../Themes/Centreon-2/style.css" type="text/css">

<link rel="stylesheet" href="./install.css" type="text/css">

<link rel="stylesheet" href="./pub_install.css" type="text/css">

<script type="text/javascript" src="../include/common/javascript/jquery/jquery.min.js"></script>

<script type="text/javascript" src="../include/common/javascript/jquery/jquery-ui.js"></script>

<script type="text/javascript">jQuery.noConflict();</script>

<script type='text/javascript'>

jQuery().ready(function () {

var curstep = 1;

jQuery('#installationContent').load('./step_upgrade/step' + curstep + '.php');

});

/**

* Go back to previous page

*

* @param int stepNumber

* @return void

*/

function jumpTo(stepNumber) {

jQuery('#installationContent').load('./step_upgrade/step' + stepNumber + '.php');

}

/**

* Do background process

*

* @param boolean async

* @param string url

* @param array data

* @param function callbackOnSuccess

* @return void

*/

function doProcess(async, url, data, callbackOnSuccess) {

jQuery.ajax({

type: 'POST',

url: url,

data: data,

success: callbackOnSuccess,

async: async

});

}

</script>

</head>

<body rightmargin="0" topmargin="0" leftmargin="0">

<div id='installationFrame'>

<div id='installationContent'></div>

</div>

</body>

</html>

 


Hi, 

 

Could you provide the command line? 


It looks like you’re not checking the server where as400 connector is running or at least this is the centreon webserver who is answering to your request.

 

 


yes that what i think too.

/usr/lib/centreon/plugins//centreon_as400_connector_client.pl --plugin=os::as400::connector::plugin --mode=disks --connector-hostname='localhost' --connector-port='80' --connector-proto='http' --as400-hostname=10.157.222.42 --as400-username='user' --as400-password='pass'  --filter-disk-name='' --unknown-status='' --warning-status='' --critical-status='' --warning-space-usage-prct='' --critical-space-usage-prct='' --debug

These connectors options was specified because default’s don’t work.


Try with  --connector-port='8091'. 

 

If it doesn’t work, provide the error message. 

 

Also, the result of this command netstat -plantu | grep java can help.


here the return:

UNKNOWN: 500 Can't connect to localhost:8091 (Connexion refusée)

======> request send

POST http://localhost:8091/

 

Netstat -plantu | grep java has no return and no java listening in netstat .

 

The --connector-port and connector-hostname has referred to the centreon webserver, right ?

We have centreon web with centos vm from the centreon site.

 

 


Nope, the connector is the as400 daemon, the one you installed with this command

 

yum install centreon-plugin-Operatingsystems-AS400-daemon.noarch

 

After, you have to start it

 

service centreon-as400 start

 

Then try again, should work


That’s good thanks.

 

I didn’t see the .noarch for this command.

 

I have install the following command

yum install centreon-plugin-Operatingsystems-AS400-daemon 

and don’t work. 

 

Now  it’s work after having install with

yum install centreon-plugin-Operatingsystems-AS400-daemon.noarch and start.

 

Thanks a lot


Awesome. You’re welcome. 


Edit: it works without the .noarch. 


Nope, the connector is the as400 daemon, the one you installed with this command

 

yum install centreon-plugin-Operatingsystems-AS400-daemon.noarch

 

After, you have to start it

 

service centreon-as400 start

 

Then try again, should work

 

Hello,

 

The documentation page says nothing about starting the AS/400 daemon service. It only mentions installing it. The AS/400 plugin documentation page is still incomplete even a year after this topic was created..


Reply