Getting /var file system service monitor by default

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ganeshsambandam
Posts: 62
Joined: Mon Sep 10, 2018 1:52 pm

Getting /var file system service monitor by default

Post by ganeshsambandam »

Getting /var file system service monitor by default when add Linux/Unix servers from config wizard, we have done using Linux snmp and also using nrpe having /var coming as default, this shows a critical alerts as /var not mounted as a separate file system in the servers.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Getting /var file system service monitor by default

Post by scottwilkerson »

ganeshsambandam wrote:Getting /var file system service monitor by default when add Linux/Unix servers from config wizard, we have done using Linux snmp and also using nrpe having /var coming as default, this shows a critical alerts as /var not mounted as a separate file system in the servers.
Can you show the output of the following on that server:

Code: Select all

df -h
Thanks
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
ganeshsambandam
Posts: 62
Joined: Mon Sep 10, 2018 1:52 pm

Re: Getting /var file system service monitor by default

Post by ganeshsambandam »

whcinxcamongodbs04b:~ # df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 16G 522M 16G 4% /run
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/sda2 38G 18G 19G 50% /
/dev/mapper/data_vg-data01_lv 1.2T 875G 354G 72% /data01
/dev/mapper/main1-cfgdata 98G 60M 93G 1% /cfgdata
tmpfs 3.2G 0 3.2G 0% /run/user/6503
tmpfs 3.2G 0 3.2G 0% /run/user/0
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Getting /var file system service monitor by default

Post by scottwilkerson »

Looking at this list, /var is not a mount point so it cannot be monitored separately from /
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
ganeshsambandam
Posts: 62
Joined: Mon Sep 10, 2018 1:52 pm

Re: Getting /var file system service monitor by default

Post by ganeshsambandam »

yes, /var is not a separate mount point from the server, but i see /var as a service after added the server to monitoring. I see this in host summary list of critical services. I can't see the service in core config manager, seems to be a stale service which getting added while adding server to monitoring. how do we get this fixed? Much appreciated.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Getting /var file system service monitor by default

Post by ssax »

If you're not selecting it (or seeing it) in the configuration wizards, my first inclination is that you have a service called /var that is applied to a hostgroup that the host is a part of. You will need to go to Configure > Core Config Manager > Services, search for the exact name of the service, and then look at all of them and see if one of them has a hostgroup selected that the other hosts that shouldn't have the service also belong to.

If you need help you can PM one of us a copy of your profile (Admin > System Profile > Download Profile) and we can help you look but we'll need to know the exact service name and the exact hostname of one that shouldn't have it and does.

Additionally, please send the output of these commands just in case:

Code: Select all

ps aux | grep nagios.cfg
ipcs -q
ganeshsambandam
Posts: 62
Joined: Mon Sep 10, 2018 1:52 pm

Re: Getting /var file system service monitor by default

Post by ganeshsambandam »

Yes, we have not seen /var as a disk while add server via Linux-snmp, but seeing it as a critical/warning service which doesn't exist to the host services.
Configure > Core Config Manager > Services, searched for /var service and all of them are actual/obsolute monitoring. I do not see the /var service here which server doesn't have /var mounted, but i see /var as warning or critical when I'm seeing in Hostgroup Summary under Services.

PFB and PFA profile.

Nagios XI server:-
@ohcinxnagiosxi1 ~]# ps aux | grep nagios.cfg
root 7183 0.0 0.0 112704 924 pts/0 S+ 11:40 0:00 grep --color=auto nagios.cfg
nagios 30061 1.1 0.0 34104 12056 ? Ss 11:33 0:05 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 30134 0.0 0.0 34096 8720 ? S 11:33 0:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
[root@ohcinxnagiosxi1 ~]# ipcs -q

------ Message Queues --------
key msqid owner perms used-bytes messages
0x9b000002 13729792 nagios 600 0 0
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Getting /var file system service monitor by default

Post by scottwilkerson »

Go to CCM -> Services
select ohcinxunix.gale.web from the template dropdown
Edit "/var Disk Usage"
Click the Hostgroups button
you have linux-servers added here, which means this will be added to every host in linux-servers
Remove that.
Close
Save
Apply Configuration
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
ganeshsambandam
Posts: 62
Joined: Mon Sep 10, 2018 1:52 pm

Re: Getting /var file system service monitor by default

Post by ganeshsambandam »

ohcinxunix server has /var file system mounted in the server and it's fine to monitor.

Linux-servers group to identify the list server Linux servers, do you want to remove the host group from all the linux servers that we added?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Getting /var file system service monitor by default

Post by scottwilkerson »

ganeshsambandam wrote:ohcinxunix server has /var file system mounted in the server and it's fine to monitor.

Linux-servers group to identify the list server Linux servers, do you want to remove the host group from all the linux servers that we added?
In that SERVICE config it has the host specified so it will still be monitored but also the hostgroup is specified in the service.

If you add a hostgroup to a service it will create a separate service for ALL members of the hostgroup.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked