Hello I am trying NRDP, I installed as follow in your PDF.
But if I fill de the form in http://ip/nrdp/ I get always:
<result><status>-1</status><message>BAD TOKEN</message></result>
What is wrong?
NRDP - BAD TOKEN
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: NRDP - BAD TOKEN
Where you are placing this address? Are you trying to contact it directly through your address bar? If it is on the remote NRDP client's side, have you made sure to pass your valid NRDP token in the config file so it can reach the XI server?
-
- Posts: 50
- Joined: Mon Feb 06, 2012 11:13 pm
Re: NRDP - BAD TOKEN
We use Nagios Core.
I used URL and a perl, ssh, php and python clients, all gets the message BAD TOKEN.
I used URL and a perl, ssh, php and python clients, all gets the message BAD TOKEN.
Re: NRDP - BAD TOKEN
Did you verify that you have the correct token in the nrdp server config file?
Do you see any errors in the apache error log?
Code: Select all
$cfg['authorized_tokens'] =
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 50
- Joined: Mon Feb 06, 2012 11:13 pm
Re: NRDP - BAD TOKEN
<?php
// NRDP Config File
// Copyright (c) 2010 Nagios Enterprises, LLC.
// License: Nagios Open Software License <http://www.nagios.com/legal/licenses>
//
// $Id: config.inc.php 12 2010-06-19 04:19:35Z egalstad $
// an array of one or more tokens that are valid for this NRDP install
// a client request must contain a valid token in order for the NRDP to response or honor the request
// NOTE: tokens are just alphanumeric strings - make them hard to guess!
$cfg['authorized_tokens'] = array(
//"ithinkitsok", // <-- not a good token
);
// do we require that HTTPS be used to access NRDP?
// set this value to 'false' to disable HTTPS requirement
$cfg["require_https"]=false;
// do we require that basic authentication be used to access NRDP?
// set this value to 'false' to disable basic auth requirement
$cfg["require_basic_auth"]=false;
// what basic authentication users are allowed to access NRDP?
// comment this variable out to allow all authenticated users access to the NRDP
$cfg["valid_basic_auth_users"]=array(
"nrdpuser"
);
// the name of the system group that has write permissions to the external command file
// this group is also used to set file permissions when writing bulk commands or passive check results
// NOTE: both the Apache and Nagios users must be a member of this group
$cfg["nagios_command_group"]="nagcmd";
// full path to Nagios external command file
$cfg["command_file"]="/usr/local/nagios/var/rw/nagios.cmd";
// full path to check results spool directory
$cfg["check_results_dir"]="/usr/local/nagios/var/spool/checkresults";
// full path to directory where temp scratch files can be written
// NOTE: the Apache user need to be able create files here, and the Nagios user needs to read/delete those same files, so the /tmp system directory won't work (it has a sticky bit on it)
$cfg["tmp_dir"]="/usr/local/nagios/var/tmp";
///////// DONT MODIFY ANYTHING BELOW THIS LINE /////////
$cfg['product_name']='nrdp';
$cfg['product_version']='1.0'
// NRDP Config File
// Copyright (c) 2010 Nagios Enterprises, LLC.
// License: Nagios Open Software License <http://www.nagios.com/legal/licenses>
//
// $Id: config.inc.php 12 2010-06-19 04:19:35Z egalstad $
// an array of one or more tokens that are valid for this NRDP install
// a client request must contain a valid token in order for the NRDP to response or honor the request
// NOTE: tokens are just alphanumeric strings - make them hard to guess!
$cfg['authorized_tokens'] = array(
//"ithinkitsok", // <-- not a good token
);
// do we require that HTTPS be used to access NRDP?
// set this value to 'false' to disable HTTPS requirement
$cfg["require_https"]=false;
// do we require that basic authentication be used to access NRDP?
// set this value to 'false' to disable basic auth requirement
$cfg["require_basic_auth"]=false;
// what basic authentication users are allowed to access NRDP?
// comment this variable out to allow all authenticated users access to the NRDP
$cfg["valid_basic_auth_users"]=array(
"nrdpuser"
);
// the name of the system group that has write permissions to the external command file
// this group is also used to set file permissions when writing bulk commands or passive check results
// NOTE: both the Apache and Nagios users must be a member of this group
$cfg["nagios_command_group"]="nagcmd";
// full path to Nagios external command file
$cfg["command_file"]="/usr/local/nagios/var/rw/nagios.cmd";
// full path to check results spool directory
$cfg["check_results_dir"]="/usr/local/nagios/var/spool/checkresults";
// full path to directory where temp scratch files can be written
// NOTE: the Apache user need to be able create files here, and the Nagios user needs to read/delete those same files, so the /tmp system directory won't work (it has a sticky bit on it)
$cfg["tmp_dir"]="/usr/local/nagios/var/tmp";
///////// DONT MODIFY ANYTHING BELOW THIS LINE /////////
$cfg['product_name']='nrdp';
$cfg['product_version']='1.0'
Re: NRDP - BAD TOKEN
estebanmonge,
Which version of Nagios Core are you running? There have been some reported issues with Core 4.0 and NRDP.
-Yancy
Which version of Nagios Core are you running? There have been some reported issues with Core 4.0 and NRDP.
-Yancy
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: NRDP - BAD TOKEN
from you NRDP config file, change this
to
where YOURTOKEN is replaced with the token you are using
Code: Select all
$cfg['authorized_tokens'] = array(
//"ithinkitsok", // <-- not a good token
);
Code: Select all
$cfg['authorized_tokens'] = array(
"YOURTOKEN",
);