NagVis error
-
robinjporter
- Posts: 12
- Joined: Tue Jan 16, 2018 12:11 pm
NagVis error
Hi there
We are trying to get NagVis working on a new XI server - however we see the error in the attached screenshot: Any ideas on why this might occur, and how we could fix it?
Many thanks,
Robin
We are trying to get NagVis working on a new XI server - however we see the error in the attached screenshot: Any ideas on why this might occur, and how we could fix it?
Many thanks,
Robin
You do not have the required permissions to view the files attached to this post.
Re: NagVis error
You can try adding this under your /etc/my.cnf [mysqld] section:
If you're running EL8, put it in /etc/my.cnf.d/client.cnf under both [client] and [client-mariadb] sections, then restart mysql/mariadb.
Then restart mysql/mariadb:
Then try again.
If it still fails, please PM me a copy of your profile, you can download it from Admin > System Profile by clicking the Download Profile button.
If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:
Then send me the resulting /usr/local/nagiosxi/var/components/profile.zip file.
If the profile script fails, please include the ENTIRE output.
Code: Select all
init-connect='SET NAMES utf8'Then restart mysql/mariadb:
Code: Select all
systemctl restart mariadb
systemctl restart mysql
systemctl restart mysqld
If it still fails, please PM me a copy of your profile, you can download it from Admin > System Profile by clicking the Download Profile button.
If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:
Code: Select all
rm -rf /usr/local/nagiosxi/var/components/profile*
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORTIf the profile script fails, please include the ENTIRE output.
Re: NagVis error
Adding init-connect='SET NAMES utf8' to /etc/my.cnf and restarting the offloaded database didn"t solve the issue.
Might the offloaded database be the issue ?
Might the offloaded database be the issue ?
Re: NagVis error
Not likely related.
Please PM me a copy of your profile.zip, you can download it from Admin > System Profile by clicking the Download Profile button.
Include the output of this command:
Additionally, what XI version are you running?
Please PM me a copy of your profile.zip, you can download it from Admin > System Profile by clicking the Download Profile button.
Include the output of this command:
Code: Select all
rpm -qa | grep phpRe: NagVis error
If you're running PHP 7.4 I think that is the reason, you will need to edit this file:
Change line 273 from this:
To this (replacing those braces with brackets):
EDIT: What specific place in Nagvis did you go to in order to get that error?
Code: Select all
/usr/local/nagvis/share/server/core/functions/oldPhpVersionFix.phpCode: Select all
$bytes = (ord($utf16{0}) << 8) | ord($utf16{1});Code: Select all
$bytes = (ord($utf16[0]) << 8) | ord($utf16[1]);Re: NagVis error
I am indeed running PHP 7.4.
A lot more {} needed to be replaced by []
I have attached the file where I changed all needed entries and commented the original lines
A lot more {} needed to be replaced by []
I have attached the file where I changed all needed entries and commented the original lines
You do not have the required permissions to view the files attached to this post.
Re: NagVis error
After changing the php file as mentionned before I can start using Nagvis.
I was able to :
Is this also related to PHP 7.4 compatibility issues ?
I was able to :
- Delete all demo maps
Create a new map
Upload a background
Set the background for the new map
Code: Select all
Failed to get objects: Error: (0) Undefined property: CorePDOHandler::$data<div class="details">URL: /nagvis/server/core/ajax_handler.php?mod=Map&act=addModify&show=action-nagios&type=host&x=329&y=195&_ajaxid=1610982102<br> File: /usr/local/nagvis/share/server/core/classes/CorePDOHandler.php<br> Line: 306<br> <code>#0 /usr/local/nagvis/share/server/core/classes/CorePDOHandler.php(306): nagvisExceptionErrorHandler(8, 'Undefined prope...', '/usr/local/nagv...', 306, Array)<br> #1 /usr/local/nagvis/share/server/core/classes/CorePDOHandler.php(332): CorePDOHandler->prep('SELECT name1,na...')<br> #2 /usr/local/nagvis/share/server/core/classes/GlobalBackendPDO.php(248): CorePDOHandler->query('SELECT name1,na...', Array)<br> #3 /usr/local/nagvis/share/server/core/mapcfg/default.php(145): GlobalBackendPDO->getObjects('host', '', '')<br> #4 /usr/local/nagvis/share/server/core/mapcfg/default.php(159): getObjectNames('host', Object(GlobalMapCfg), NULL, Array)<br> #5 /usr/local/nagvis/share/server/core/classes/ViewMapAddModify.php(394): listHostNames(Object(GlobalMapCfg), NULL, Array)<br> #6 /usr/local/nagvis/share/server/core/classes/ViewMapAddModify.php(509): ViewMapAddModify->drawField('host_name', Array, Array)<br> #7 /usr/local/nagvis/share/server/core/classes/ViewMapAddModify.php(537): ViewMapAddModify->drawFields(Array)<br> #8 /usr/local/nagvis/share/server/core/classes/ViewMapAddModify.php(620): ViewMapAddModify->drawForm()<br> #9 /usr/local/nagvis/share/server/core/classes/CoreModMap.php(133): ViewMapAddModify->parse()<br> #10 /usr/local/nagvis/share/server/core/functions/index.php(120): CoreModMap->handleAction()<br> #11 /usr/local/nagvis/share/server/core/ajax_handler.php(59): require('/usr/local/nagv...')<br> #12 {main}</code>Output: <pre><form id="addmodify" name="addmodify" action="javascript:submitForm('/nagvis/server/core/ajax_handler.php?mod=Map&act=addModify', 'addmodify');" method="POST"> <input type="hidden" id="_form_name" name="_form_name" value="addmodify" /> <input type="hidden" id="_update" name="_update" value="0" /> <input type="hidden" id="sec" name="sec" value="general" /> <ul class="nav" id="nav"><li id="nav_general" class="active"><a href="javascript:toggle_section('general')">General</a></li><li id="nav_appearance" ><a href="javascript:toggle_section('appearance')">Appearance</a></li><li id="nav_state" ><a href="javascript:toggle_section('state')">Status</a></li><li id="nav_actions" ><a href="javascript:toggle_section('actions')">Actions</a></li><li id="nav_label" ><a href="javascript:toggle_section('label')">Label</a></li><li id="nav_worldmap" ><a href="javascript:toggle_section('worldmap')">Worldmap</a></li></ul><div id="sec_general" class="section" style=""><table class="mytable"><tr class="must"><td class=tdlabel>host_name</td><td class=tdbox></td><td class=tdfield></pre>Re: NagVis error
It may be related, I'll need to lab this up, I'm currently installing XI and setting up PHP 7.4 to test against. If you don't hear from me by tomorrow midday, reply to the post so it pops up on our dashboard.
Thank you!
Thank you!
Re: NagVis error
It's working properly for me with your changes.
Please create a ticket for this and include a link back to this forum thread so we can get a remote session setup to debug further:
https://support.nagios.com/tickets/
Thank you!
Please create a ticket for this and include a link back to this forum thread so we can get a remote session setup to debug further:
https://support.nagios.com/tickets/
Thank you!