Page 1 of 3

Nagios upgrade from 3 to 4.3.1 -a lot of issues

Posted: Tue Mar 21, 2017 10:52 am
by dsnagi
Hi all,
A few days ago I got a task to fix Nagios issues after upgrade from 3 to 4.3.1 (I'm not very familiar with nagios but I succeded to fix some issues at my own).
I don't know the steps that were taken during the upgrade process nor the previous nagios state.

Only current state of nagios is known to me and that is:
1. pnp4nagios graphs are empty - graphs for example for time period '4 hours' contain no data, please see attach 'epmty_graphs_pic1.jpg'; 'one month' contain some traffic, see atach emty_graphs_pic2.jpg, that was before upgrade,
2. nagios doesn't read interfaces' descriptions - instead displaying e.g. 'customername-customerlocation' it displays 'GigabitEthernet1/0/10', see atach 'interfaces_desc.jpg'
3. link inside email body doesn't work - clicking the link does nothing, see 'atachment email_body_link.jpg'

As I already said a lot of issues, any help will be welcome.
Many thanks in advance.

Re: Nagios upgrade from 3 to 4.3.1 -a lot of issues

Posted: Tue Mar 21, 2017 1:49 pm
by avandemore
Please remember pnp4nagios is not written or maintained by Nagios. You may need to refer to them for specifics on their product. You can find their website here:

https://docs.pnp4nagios.org/

Can you show the definition for you service?

What is the full command and output when run the CLI?

Re: Nagios upgrade from 3 to 4.3.1 -a lot of issues

Posted: Tue Mar 21, 2017 6:49 pm
by dsnagi
"Can you show the definition for you service?"
Under Configuration - Services I got those rows - see attachments 'configuration_services_1 and configuration_services_2'.

In nagios.cfg a have this line cfg_dir=/usr/local/nagios/etc/objects/some_dir_name/
Inside some_dir_name/ there are .cfg files, and one of them is services cfg file, but the name is not like services.cfg than services-translated-to-my-native-language.cfg (however, I think this is not the cause of issues).
Inside services-but-in-my-native-language.cfg there are only a few lines.
Another cfg file network-equipment-but-translated-to-my-native-language.cfg file contains lines about network devices like this (I'm showing only a few of them below):

define service{
use local-service,srv-pnp ; Name of service template to use
hostgroup_name group1,group2
service_description PING
check_command check_ping!100.0,20%!950.0,60%
}


define service {
use local-service ;,srv-pnp
hostgroup_name group1,!group3
service_description Check Interface
check_command check_interface_table
; hosts
}


define host{
use generic-switch ; Inherit default values from a template
host_name hostname1 ; The name we're giving to this switch
alias alias1 ; A longer name associated with the switch
address xxx.xxx.xxx.15 ; IP address of the switch
hostgroups group1 ; Host groups this switch is associated with
}

define host{
use generic-switch
host_name hostname2
alias alias2
address xxx.xxx.xxx.17
hostgroups group1
parents hostname1
}


"What is the full command and output when run the CLI?"
I found this command:
"/usr/bin/perl /usr/local/nagios/libexec/check_interface_table_v3t.pl -h $HOSTNAME$ -C public -H $HOSTADDRESS$ -f --cp 1" (without quotes")
inside commands.cfg file in '/usr/local/nagios/etc/objects/' directory.

Output of this command is:
UNKNOWN - SNMP session object creation problem: Unable to resolve UDP/IPv4 address '$'

I'm not sure if I gave information you asked (I did my best to figure out what I need to provide).

Re: Nagios upgrade from 3 to 4.3.1 -a lot of issues

Posted: Tue Mar 21, 2017 7:27 pm
by dsnagi
And I forgot to add one more, I think useful info, ls -l command inside '/usr/local/pnp4nagios/var/perfdata' directory output this (I'm showing only one directory, there are 80 directories in total):
drwxrwxr-x 2 nagios nagios 4096 Mar 10 13:15 hostname1 -this means there are no writings (updates) to .rrd and .xml files inside those directories, so lately there are no graphs.

So how to find the reason for my rrd and xml files are not being updated?

Re: Nagios upgrade from 3 to 4.3.1 -a lot of issues

Posted: Tue Mar 21, 2017 8:02 pm
by dsnagi
More info,
after replacing $HOSTADDRESS$ with real ip address e.g. 10.10.10.10 issuing this command '/usr/bin/perl /usr/local/nagios/libexec/check_interface_table_v3t.pl -h $HOSTNAME$ -C public -H 10.10.10.10 -f --cp 1' (without quotes)
I got this output:
OK - Initial run... <a href=/interfacetable_v3t/tables/nstorage1Q24-Interfacetable.html target=_self>[details]</a>

Re: Nagios upgrade from 3 to 4.3.1 -a lot of issues

Posted: Wed Mar 22, 2017 11:33 am
by avandemore
Can you provide your nagios log? It's usually located at /usr/local/nagios/var/nagios.log.

Re: Nagios upgrade from 3 to 4.3.1 -a lot of issues

Posted: Wed Mar 22, 2017 7:09 pm
by dsnagi
Here is my nagios.log file in attachment.
Please be informed that I changed real names with some generic ones like master1, master2 and so on.
Also I removed some lines for shortness (removed lines are the same as the other lines -only numbers are slightly different).

Just to update that I recently added apache user to nagios group. Before this action nagios group contained only nagios user, and nagcmd group contained nagios and apache users, now nagios group also contains both users nagios and apache. Unfortunately, this didn't solve the problem (I thought maybe wrong rights were the problem).

Re: Nagios upgrade from 3 to 4.3.1 -a lot of issues

Posted: Thu Mar 23, 2017 10:19 am
by avandemore

Re: Nagios upgrade from 3 to 4.3.1 -a lot of issues

Posted: Mon Mar 27, 2017 8:45 am
by dsnagi
avandemore wrote:Did you see this post?

https://support.nagios.com/forum/viewto ... =10#p73889
I read a lot of posts but this one didn't. Thank you.
It seems I have two options: 1. recompile the broker (NEB) module or 2. if it doesn't work go back to Nagios 3.5.1.

Ok, I will post back when I try first/both options.

Re: Nagios upgrade from 3 to 4.3.1 -a lot of issues

Posted: Mon Mar 27, 2017 10:49 am
by scottwilkerson
Thanks, let us know how it works out.