H-Software / Zabbix-Template-Linux-Pacemaker

13 stars 8 forks source link

PB template zabbix pacemaker check #1

Open barto95100 opened 7 years ago

barto95100 commented 7 years ago

HI, I have this problem in log of zabbix server : error reason for "DB-CBV-01:pacemaker.nodes_configured" changed: Received value [sh: /root/scripts/crm_mon_stats.sh: Permission denied] is not suitable for value type [Numeric (unsigned)] and data type [Decimal] 51720:20170331:023758.424 error reason for "DB-CBV-01:pacemaker.resources_configured" changed: Received value [sh: /root/scripts/crm_mon_stats.sh: Permission denied] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]

And I don't understand why ? do you help me ?

czhujer commented 7 years ago

Hi,

which distro and version do you have? Plus zabbix & pacemaker version?

Patrick

barto95100 commented 7 years ago

Hi,

The distro is : CentOS release 6.7 (Final)

version of pacemaker is : Pacemaker 1.1.11

and zabbix agent : zabbix_agentd (daemon) (Zabbix) 3.2.4 Revision 65975 27 February 2017, compilation time: Feb 28 2017 23:17:08

czhujer commented 7 years ago

Hi,

thanks. Can you run these commands from bash promp? Ideally under zabbix user..

something like this:

[root@b8786896b921 configs]# sudo -u zabbix bash
bash-4.1$ cd /etc/zabbix/scripts/
bash-4.1$ ./crm_mon_stats.sh -i nodes_resources_running
barto95100 commented 7 years ago

Hi,

the result :

./crm_mon_stats.sh -i nodes_resources_running 8 3

czhujer commented 7 years ago

Hi,

thanks. That's weird. Can you run original command "crm_mon --one-shot --as-xml"?

barto95100 commented 7 years ago

Hi,

yes it's ok

<?xml version="1.0"?>

[image: photo] Ludovic Ramos Responsable VoIP, SCT TELECOM A 17-19 Avenue de la metallurgie - 93210 - La plaine Saint Denis P +33892020220 <+33892020220> E l.ramos@sct-telecom.fr W www.sct-telecom.fr 2017-04-05 11:17 GMT+02:00 Patrik Majer : > Hi, > > thanks. That's weird. > Can you run original command "crm_mon --one-shot --as-xml"? > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > , > or mute the thread > > . >
czhujer commented 7 years ago

hi,

you have to update python parsing lines.

But I can't see section with nodes in this XML. Is this complete output?

newthinz commented 3 years ago

if you're using python3 make sure you add that to the script or fix your path. also, the print upjects should be in parentheses(). just add that and you should be good.

Thanks!