[Bug 1048621] Review Request: zabbix22 - Open-source monitoring solution for your IT infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1048621



--- Comment #11 from Volker Fröhlich <volker27@xxxxxx> ---
(In reply to Orion Poplawski from comment #10)

> Okay, but let's fix this then:
> 
> warning: bogus date in %changelog: Mon Jan  5 2014 Volker Fröhlich
> <volker27@xxxxxx> - 2.2.1-1.1
> warning: bogus date in %changelog: Tue Nov  3 2013 Volker Fröhlich
> <volker27@xxxxxx> - 2.0.9-2

Done

> Ah, well I guess it is still needed but needs to be changed:
> 
> $ grep su zabbix-logrotate.in
>         su USER USER
> 
> # Install log rotation
> sed -e 's|COMPONENT|agentd|g; s|USER|zabbix|g' %{SOURCE5} > \
>      $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-agent
> sed -e 's|COMPONENT|server|g; s|USER|zabbixsrv|g' %{SOURCE5} > \
>      $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-server
> sed -e 's|COMPONENT|proxy|g; s|USER|zabbixsrv|g' %{SOURCE5} > \
>      $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-proxy
> 
> Also, you have no business editng the source file in place.
> 
> So, perhaps:
> 
> %if 0%{?rhel}
> sed -e 's|COMPONENT|agentd|g; /su USER USER/d' %{SOURCE5} > \
>      $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-agent
> sed -e 's|COMPONENT|server|g; /su USER USER/d' %{SOURCE5} > \
>      $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-server
> sed -e 's|COMPONENT|proxy|g; /su USER USER/d' %{SOURCE5} > \
>      $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-proxy
> %else
> ...
> %endif

That was all wrong indeed!

> > > - This has long been a bug in zabbix_agentd.conf:
> > > 
> > > Hostname=Zabbix server
> > > 
> > > This should be left unset.
> > 
> > Leaving it unset would break active checks, I think but it's one of the
> > better ideas I've heard so far.
> 
> No, setting Server= and ServerActive= is needed for that.  Hostname is the
> hostname of the machine the agent is running on.
> 
> > We discussed the Hostname matter on
> > https://bugzilla.redhat.com/show_bug.cgi?id=825833 and failed to come up
> > with something useful.
> 
> Although the upstream bug basically says packagers should do what they need
> to do to make it work.

With no value set for Hostname and HostnameItem, the agent defaults to the
result  for the item key "system.hostname", which resembles "uname -n". There's
no guarantee this is set to anything unique or even useful on any given system.
It also doesn't necessarily match the naming scheme intended by the user.

Eventually, un-setting only removes the confusion about why it says "Zabbix
server" when it is actually a monitored host.

Even if all monitored systems have their Hostnames hard-coded to "Zabbix
server", all passive items would still work. The server log would be just as
littered with configuration queries from non-existing Zabbix hosts as with
different Hostnames. The situation is of course worse if the user is trying
active items or auto-registration.

If the agent is installed on the same host, changing the default would break
the example host shipped in the SQL files. On the other hand, if the agent is
not installed on the same machine as the agent, users have to touch the config
file to set Server and/or ServerActive anyway. Conclusively, I'd suggest to
re-open the other ticket to discuss this further. 

> Hmm:
> 
> @@ -761,7 +761,8 @@ fi
>  %config(noreplace) %{_sysconfdir}/%{srcname}/alertscripts
>  %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-server
>  %ghost %{_sbindir}/zabbix_server
> -%attr(0750,root,zabbixsrv) %{_sharedstatedir}/zabbixsrv
> +%attr(0755,zabbixsrv,zabbixsrv) %dir %{_sharedstatedir}/zabbixsrv
> +%attr(0755,zabbixsrv,zabbixsrv) %dir %{_sharedstatedir}/zabbixsrv/tmp
>  %if 0%{?fedora}
>  %ghost %{_unitdir}/zabbix-server.service
>  %else
> @@ -797,7 +798,7 @@ fi
>  %config(noreplace) %{_sysconfdir}/zabbix_agentd.conf
>  %config(noreplace) %{_sysconfdir}/%{srcname}/zabbix_agentd.conf
>  %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-agent
> -%attr(0750,zabbix,zabbix) %dir %{_sharedstatedir}/zabbix
> +%attr(750,zabbix,zabbix) %dir %{_sharedstatedir}/zabbix
>  %if 0%{?fedora}
>  %{_unitdir}/zabbix-agent.service
>  %{_unitdir}/zabbix-agentd.service
> @@ -823,7 +824,8 @@ fi
>  %config(noreplace) %{_sysconfdir}/%{srcname}/externalscripts
>  %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-proxy
>  %ghost %{_sbindir}/zabbix_proxy
> -%attr(0750,root,zabbixsrv) %{_sharedstatedir}/zabbixsrv
> +%attr(0755,zabbixsrv,zabbixsrv) %dir %{_sharedstatedir}/zabbixsrv
> +%attr(0755,zabbixsrv,zabbixsrv) %dir %{_sharedstatedir}/zabbixsrv/tmp
>  %if 0%{?fedora}
>  %ghost %{_unitdir}/zabbix-proxy.service
>  %else
> 
> I would keep each at 0750, just fix the owner as you did.

Ouch, fixed now!

> > > - Not sure about this:
> > > # rpm -V zabbix22
> > > Unsatisfied dependencies for zabbix22-2.2.1-1.1.el6_4.x86_64:
> > >         zabbix conflicts with zabbix22-2.2.1-1.1.el6_4.x86_64
> > >         zabbix conflicts with zabbix22-2.2.1-1.1.el6_4.x86_64
> > > 
> > > Perhaps a problem with providing and conflicting with zabbix?
> > 
> > I hadn't provided versions!
> 
> +Conflicts:       %{srcname} < 2.0
> +Conflicts:       %{srcname}20 < 2.2
> 
> Shouldn't this be:
> 
> Conflicts:       %{srcname} < 2.2
> Conflicts:       %{srcname}20
> 
> ?

Right again, fixed!

Spec URL: http://www.geofrogger.net/review/zabbix22.spec
SRPM URL: http://www.geofrogger.net/review/zabbix22-2.2.1-3.fc18.src.rpm

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review





[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]