LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   zabbix - postfix: postfix is running but can't see info from it on zabbix (https://www.linuxquestions.org/questions/linux-server-73/zabbix-postfix-postfix-is-running-but-cant-see-info-from-it-on-zabbix-4175451810/)

eantoranz 02-26-2013 03:23 PM

zabbix - postfix: postfix is running but can't see info from it on zabbix
 
Hi! Did I say postfix? It's postbix. Damn!

I'm trying to set up postbix to monitor a postgresql service.

I have already configured it to monitor the db and, from what the log is telling me, it's working:

Code:

2013-02-26 16:12:24,134 [pool-1-thread-3] INFO  Postbix - Done with dbJob on database sanos_omega QueryList elapsed time 6 ms
 2013-02-26 16:13:24,142 [pool-1-thread-4] INFO  Postbix - Done with dbJob on database sanos_omega QueryList elapsed time 10 ms
 2013-02-26 16:14:24,159 [pool-1-thread-5] INFO  Postbix - Done with dbJob on database sanos_omega QueryList elapsed time 14 ms
 2013-02-26 16:15:24,213 [pool-1-thread-6] INFO  Postbix - Done with dbJob on database sanos_omega QueryList elapsed time 64 ms
 2013-02-26 16:16:24,212 [pool-1-thread-7] INFO  Postbix - Done with dbJob on database sanos_omega QueryList elapsed time 6 ms
 2013-02-26 16:17:24,221 [pool-1-thread-8] INFO  Postbix - Done with dbJob on database sanos_omega QueryList elapsed time 7 ms
 2013-02-26 16:18:24,223 [pool-1-thread-9] INFO  Postbix - Done with dbJob on database sanos_omega QueryList elapsed time 7 ms

On zabbix, I uploaded the postgresql template. I set up the host (which was already created) to use the postbix template (called Template_PostgreSQL... with no other configuration, perhaps that's the problem), however I don't get to see anything about it on monitoring->latest data. I think I'm missing one configuration step that matches the Host as defined in zabbix with the host as seen in postfix. Perhaps I'm not looking in the wrong place for the readings from postbix? What do you think?

eantoranz 02-26-2013 03:38 PM

Well... this is interesting. I was thinking about the architecture of postbix. If I'm not wrong it could actually be run from any given host (like not the zabbix server, not the postgresql server... you tell it the DBs you want to monitor, including the server, and you also tell it the zabbix servers this info will be pushed to). Is that the case? Then, how does zabbix server know what server information postbix is trying to send it belongs to?

Well... hope someone can explain to me a little bit more how the pieces fir together.

eantoranz 02-26-2013 03:43 PM

Bu the way, when postbix does its check on the DB service, there's a ton of additional network traffic going to zabbix server so I assume postbix is actually sending the info to zabbix server.

Habitual 02-26-2013 05:26 PM

Quote:

Originally Posted by eantoranz (Post 4900387)
I set up the host (which was already created) to use the postbix template (called Template_PostgreSQL... with no other configuration, perhaps that's the problem), however I don't get to see anything about it on monitoring->latest data. I think I'm missing one configuration step that matches the Host as defined in zabbix with the host as seen in postfix. Perhaps I'm not looking in the wrong place for the readings from postbix? What do you think?

Is that the "Zabbix Server" in Zabbix?

give me some time to consider this issue as I'm beating up my own Zabbix 1.8.x at the moment. Damn WinTendo+snmp bull-pucky.

What zabbix version have you installed?
I don't have any PostgreSQL services running AFAIK, so I need time to think on this issue.

Subscribed with interest...

JJ

eantoranz 02-27-2013 07:34 AM

Zabbix 2.0.5
Postbix 1.2.0-RC1

Habitual 02-27-2013 07:41 AM

Quote:

Originally Posted by eantoranz (Post 4900387)
I set up the host (which was already created)

Is that the "Zabbix Server" in Zabbix?

eantoranz 02-27-2013 07:44 AM

Oh... I hadn't understood to which of the hosts I was referring to you were asking about.

The zabbix server is also the host _running_ postbix. And the host I want to check the DBs running on it is _not_ the zabbix server. It's a host I had already created (it's set up to be monitored with zabbix agent but I don't have the agent running on the host yet..... and now I added the monitoring with postbix).

eantoranz 02-27-2013 07:49 AM

Zabbix server IP: 192.168.55.251. It's running zabbix server anid zabbix frontend. Postbix is running here also, configured to notify local zabbix server (localhost:10051).
PG server IP: 192.168.55.1. This host is running postgres and it's holding the zabbix DB, by the way.

Habitual 02-27-2013 07:54 AM

you need to install the agent on every host you wish to monitor, unless you go "another route" (snmp, but that's very elaborate, so we won't go there).

You must modify /etc/zabbix/zabbix_agentd.conf for these 2 values on the host to be monitored, specifically:
Code:

Hostname=hostname.as.setup.in.zabbix.server
Server=ip.of.zbx.server

this is why you don't see any data for said host in Latest Data...

Please pass the url for the postbix template you download and added to the zabbix server.

Thanks!

eantoranz 02-27-2013 07:57 AM

Ok.... let me give it a try.

eantoranz 02-27-2013 08:38 AM

Ok... got the agent running and showing up information on zabbix.... still no PG stuff to show off. I'll try installing postbix on the postgres host to see if it works that way.

eantoranz 02-27-2013 09:59 AM

Well.... I think postbix is actually sending the information to zabbix for it to process it and it's failing for some reason I can't tell at the moment.

this is from postbix log:
Code:

.
.
.
 2013-02-27 10:57:22,444 [main] DEBUG Postbix - Note: buffers_alloc.ExcludeColumnsList error null
 2013-02-27 10:57:22,444 [main] DEBUG Postbix - Note: buffers_alloc.RaceConditionQueryExcludeColumnsList error null
 2013-02-27 10:57:22,445 [main] DEBUG Postbix - Ready to run DBJob for dbname ->sanos_omega
 2013-02-27 10:57:22,445 [pool-1-thread-15] DEBUG Postbix - Starting dbJob on database sanos_omega QueryList
 2013-02-27 10:57:22,447 [pool-1-thread-15] DEBUG Postbix - sending <req><host>c2Fub3Nfb21lZ2E=</host><key>YWxpdmU=</key><data>MQ==</data></req>
 2013-02-27 10:57:22,453 [pool-1-thread-15] DEBUG Postbix - received OK
 2013-02-27 10:57:22,454 [pool-1-thread-15] DEBUG Postbix - sending <req><host>c2Fub3Nfb21lZ2E=</host><key>UG9zdGJpeFZlcnNpb24=</key><data>UG9zdGJpeCBWZXJzaW9uIDEuMS4w</data></req>
 2013-02-27 10:57:22,456 [pool-1-thread-15] DEBUG Postbix - received OK
 2013-02-27 10:57:22,459 [pool-1-thread-15] INFO  Postbix - Done with dbJob on database sanos_omega QueryList elapsed time 13 ms

This is from zabbix_server.log (debug level) (grepping):
Code:

  2890:20130227:105522.381 Trapper got [<req><host>c2Fub3Nfb21lZ2E=</host><key>YWxpdmU=</key><data>MQ==</data></req>] len 76
  2890:20130227:105522.381 In process_mass_data()
  2890:20130227:105522.381 End of process_mass_data()
  2892:20130227:105522.383 Trapper got [<req><host>c2Fub3Nfb21lZ2E=</host><key>UG9zdGJpeFZlcnNpb24=</key><data>UG9zdGJpeCBWZXJzaW9uIDEuMS4w</data></req>] len 112
  2892:20130227:105522.383 In process_mass_data()
  2892:20130227:105522.383 End of process_mass_data()
  2905:20130227:105522.737 In process_escalations()
  2905:20130227:105522.737 query [txnlev:1] [begin;]
  2905:20130227:105522.738 query [txnlev:1] [select escalationid,actionid,triggerid,eventid,r_eventid,esc_step,status,nextcheck from escalations where 1=1 and escalationid between 100000000000000 and 199999999999999 order by actionid,triggerid,escalationid]
  2905:20130227:105522.739 query [txnlev:1] [commit;]
  2905:20130227:105522.740 End of process_escalations()
  2905:20130227:105522.740 escalator #1 spent 0.002833 seconds while processing escalations
  2905:20130227:105522.740 sleeping for 3 seconds
  2907:20130227:105523.324 In collect_selfmon_stats()
  2907:20130227:105523.325 End of collect_selfmon_stats()
  2907:20130227:105523.325 sleeping for 1 seconds
  2892:20130227:105524.306 Trapper got [] len 0
  2907:20130227:105524.326 In collect_selfmon_stats()
  2907:20130227:105524.326 End of collect_selfmon_stats()

I'm glad the info matches both logs but what does it mean? Thanks in advance

Habitual 02-27-2013 10:25 AM

Since you are making progress, I'm going to think some more (re-read this post!) and let you analyze what your zabbix is collecting.

Still waiting for the url to the template.
That's twice now I have asked for info and not received it, and I'm not a big fan of wasting time, so if you can't or won't answer my questions, I could quit asking them? It's up to you.

Please let me know...

eantoranz 02-27-2013 10:29 AM

Oh, sorry, man..... sometimes I forget where my nose is. Sure... the template. The template is the one included in the postbix tar.gz. Let me see if I can find it online.

And thank you very much, very kind from you.

Habitual 02-27-2013 10:31 AM

I have C.R.S. myself. (Can't remember shit) ;)

eantoranz 02-27-2013 10:33 AM

Uploaded to pastebin http://www.pastebin.ca/2317475

eantoranz 02-27-2013 10:34 AM

Could it be that I'm working with zabbix 2.x instead of 1.x?

Habitual 02-27-2013 10:36 AM

Quote:

Originally Posted by eantoranz (Post 4900913)
Could it be that I'm working with zabbix 2.x instead of 1.x?

depends on the template properties (contents of the .xml file). It may have been written for 1.x may not play nice with 2.0...

eantoranz 02-27-2013 10:37 AM

Ok... let me know what you get/infer from the template.

Habitual 02-27-2013 10:39 AM

<zabbix_export version="1.0" date="06.12.10" time="15.11">
2nd line at pastebin.ca post.

But don't despair, there's some further things we can check yet...

Habitual 02-27-2013 10:57 AM

Quote:

Originally Posted by eantoranz (Post 4900913)
Could it be that I'm working with zabbix 2.x instead of 1.x?

It "may".

there's some further things we can check yet...
inconclusive on the export_version as this file shows the same and description here..says
"Finally this template and perl file was tested for Zabbix 1.8.10, postgreSQL 8.4+ and RHEL 5.5,"

if you haven't said, I'll re-ask:
What is the OS of the zbx_server, and what is the OS of the PG host? What PG version?

"tested for" may not mean anything but it could mean a world of difference.

But https://www.zabbix.com/wiki/howto/mo...l#requirements says 1.8.10.

What site (forum, wiki, etc...) did this template come from originally?

You have any special requirement for the 2.0?

eantoranz 02-27-2013 11:02 AM

zabbix server is on ubuntu server 12.04 (running on qemu, just in case).

host I'm playing with trying to monitor is running kubuntu 12.10 (installed zabbix-agent from packages). PG is 9.1 (9.1.8-0ubuntu12.10, from packages).

No special requirement for zabbix, just wanted to give the latest stable a try. Perhaps there's some glue missing between postbix (apparently it hasn't been actively developed lately.... RC is already like one year old) and zabbix 2.x?

Habitual 02-27-2013 11:41 AM

ha! thread topic says "postfix".

I think I need a break, you must be reinstalling 1.8.10 as up until now, you been leaning on the reply button as fast as I can post. :)

and as a "note", have you associated the Template_PostgreSQL with the host?

eantoranz 02-27-2013 01:16 PM

1 Attachment(s)
Yep, template is linked

eantoranz 02-27-2013 01:53 PM

I'm setting up a VM with 12.04 to install zabbix from packages (uses 1.8.x). Will let you know how it goes there.

fl0 02-27-2013 01:56 PM

@eantoranz

your screenshot says you are using zabbix 2, the theme and tabbed interface is new in version 2...


regards fl0

eantoranz 02-27-2013 02:00 PM

So.... where should I look? Or what should I do?

fl0 02-27-2013 02:12 PM

if you need postbix, you need to install zabbix 1.8
https://www.zabbix.com/documentation...l/installation

are you sure you need postbix? maybe check_postgres is an alternative for you
http://bucardo.org/wiki/Check_postgres

eantoranz 02-27-2013 02:21 PM

Is it easy to use nagios stuff in zabbix? I mean, perhaps zabbix can handle stuff that's built for nagios.

fl0 02-27-2013 02:31 PM

sure, you need to write the template yourself, and use UserParameters

https://www.zabbix.com/documentation...userparameters

Habitual 02-27-2013 02:41 PM

fl0:

Thanks for the assist on the assist. :)

JJ

eantoranz 02-27-2013 04:15 PM

Given that it uses UserParameters and from what I gather reading the docs, check_postgres has to be set up in one zabbix agent (which could run lots of separate tests on different PG hosts/DBs) and will report them as information from the host where the agent is running, am I right?

Habitual 02-27-2013 05:28 PM

examples can be seen in /etc/zabbix/zabbix_agentd.conf:
Code:

#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
#UserParameter=mysql.version,mysql -V

but these are # commented out.

and https://www.zabbix.com/documentation...ser_parameters discusses their usage.


All times are GMT -5. The time now is 02:02 AM.