0

first off all my setup 2 VM running Fedora 19 in a pacemaker/corosync failover cluster, they have 1 cluster IP 1 VM running Fedora 19 monitoring both VM's with nagios

Right now nagios is running on both nodes all the time but I want that nagios is only running on the currently active node. Can someone help me with that?

Current DC: pcmk-2(3232249960) - partition with quorum
Version: 1.1.9-3.fc19-781a388
2 Nodes configured, unknown expected votes
1 Resources configured.


Online:  [pcmk-1 pcmk-2]

CLUSTERIP       (ofc::heartbeat:IPaddr2):       Started pcmk-2





[root@pcmk-1]crm_resuorce -L
 CLUSTERIP      (ofc::heartbeat:IPaddr2):       Started
chosen
  • 13
  • 1
  • 5
  • can you show crm_mon and crm_resource -L, can you give more information, because i don't know if you have the vm as services in cluster or if you have a cluster with two vm, so in few words, show your config – c4f4t0r Jan 09 '14 at 10:50
  • I updated the first post with the informations – chosen Jan 09 '14 at 11:04

2 Answers2

1

Okay I found the solution. Basically you add nagios as an "anything" resource

#pcs resource create nagios_test ocf:heartbeat:anything params user="nagios" binfile="/usr/local/nagios/bin/nagios" cmdline_options="-d /usr/local/nagios/etc/nagios.cfg" pidfile="/usr/local/nagios/etc/nagios.pid"
chosen
  • 13
  • 1
  • 5
0

i think you have nagios running out of cluster, if you want to run nagios together with CLUSTERIP, first remove nagios from boot start and if you are using a script under /etc/init.d/

    primitive nagios_resource lsb:nagios 
    op start interval="0" timeout="120" \
    op stop interval="0" timeout="120" \
    op monitor interval="10" timeout="30" 

    colocation nagiosandip inf: nagios_resource CLUSTERIP
c4f4t0r
  • 5,149
  • 3
  • 28
  • 41