[ZBXNEXT-579] Support 'net.if.discovery' key on FreeBSD Created: 2010 Dec 12 Updated: 2014 May 14 Resolved: 2013 Apr 09 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Agent (G) |
Affects Version/s: | None |
Fix Version/s: | 2.1.0 |
Type: | New Feature Request | Priority: | Major |
Reporter: | Oleksii Zagorskyi | Assignee: | Aleksej Ivanov (Inactive) |
Resolution: | Fixed | Votes: | 5 |
Labels: | discovery, freebsd, lld, trivial | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: | FreeBSD81_fstab.txt add_FreeBSD_discover_netif.patch | ||||||||||||
Issue Links: |
|
Description |
'/etc/fstab' output from my FreeBSD 8.1-RELEASE #0 is attached. About 'net.if.discovery' - i don't know how to introduce |
Comments |
Comment by Oleksii Zagorskyi [ 2011 Oct 26 ] |
support of 'vfs.fs.discovery' for *BSD systems already added in the |
Comment by chris scott [ 2012 Aug 08 ] |
workaround for the moment is to add this to you agent config UserParameter=net.if.discovery,ifconfig | awk ' BEGIN { print " {\"data\":\[" }/^[a-z0-9]+\:/ { gsub(/\:/,"",$ 1); if ( $ 1 != "lo0" ) print "{ \" {#IFNAME}\":\"" $ 1"\" }," } END { print "{ \"{#IFNAME}\":\"lo0\"} \n]}" } ' |
Comment by Oleksii Zagorskyi [ 2012 Aug 08 ] |
I have to say that it really works, that's cool ! |
Comment by Evgeny [ 2012 Aug 28 ] |
Chris, do you plan to add the core support for net.if.discovery? |
Comment by Lasse Bo Larsen [ 2012 Oct 03 ] |
Same im using: UserParameter=net.if.discovery,printf "{\n \"data\":[\n\n" && ifconfig | grep "^[a-z]" | sed -e 's/[0-9]:.*//' | while read a ; do printf ",\n { \" {#IFNAME}\",\"$a\" }" ; done | grep "#IFNAME" && printf "\n ]\n}\n" Hoping for native support in the future. |
Comment by Joost Bekkers [ 2013 Jan 13 ] |
Here is a patch against 2.0.4 adding the net.if.discover function. See "add_FreeBSD_discover_netif.patch" in the attachments block above. |
Comment by rodion [ 2013 Jan 16 ] |
Thanks, the patch helped me. |
Comment by Aleksej Ivanov (Inactive) [ 2013 Mar 15 ] |
Available in the development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-579 |
Comment by richlv [ 2013 Mar 15 ] |
(1) default fbsd template should be updated to use network interface discovery like linux & windows templates do (and existing net.if items should be removed) aleksej RESOLVED in r34854 sasha CLOSED |
Comment by richlv [ 2013 Mar 15 ] |
(2) when it's finished, the following doc pages should be updated (anywhere else ?) : <Sasha> CLOSED <richlv> when fbsd template will be updated, it should be listed in whatsnew as well -> REOPENED aleksej Updated: sasha CLOSED |
Comment by Andris Zeila [ 2013 Mar 15 ] |
(3) openbsd and netbsd also do not support net.if.discovery key. Most probably freebsd implementation works also for openbsd/netbsd. Need to check and if it's possible to add net.if.discovery support to openbsd/netbsd. wiper successfully tested on openbsd/netbsd. CLOSED |
Comment by Andris Zeila [ 2013 Mar 15 ] |
Successfully tested on freebsd, please review minor updates in r34401, r34404 |
Comment by Aleksej Ivanov (Inactive) [ 2013 Mar 18 ] |
Added support for NetBSD and OpenBSD |
Comment by Alexander Vladishev [ 2013 Apr 03 ] |
I'm reopening the issue. (1) is not completed. |
Comment by Aleksej Ivanov (Inactive) [ 2013 Apr 08 ] |
(6) added info about template improvements, please review sasha CLOSED |
Comment by Andrei Tunes Claro [ 2014 May 14 ] |
Hey Lasse Bo Larsen! Can you help me with this Parameter? Cannot create item: item with the same key "net.if.in[ {#IFNAME}]" already exists. What can be wrong? |
Comment by Aleksandrs Saveljevs [ 2014 May 14 ] |
Andrei, you should check whether you already have item with key "net.if.in[ {#IFNAME}]" on your host. In general, it would be better to continue this discussion on one of the places mentioned at https://www.zabbix.org/wiki/Getting_help . |
Comment by Andrei Tunes Claro [ 2014 May 14 ] |
Thanks Aleksandrs Saveljevs, What I want was send a message to Lasse Bo Larsen about this problem but I don't now how. In my server I don't have other item with this key so i can't understand why it is happening. Thank you again. |
Comment by Aleksandrs Saveljevs [ 2014 May 14 ] |
Ah, I realized that it in "net.if.in[ {#IFNAME}]" the server is complaining about the fact that it is trying to create an item with the same key as the item prototype. A bit confusing, but true. The reason is probably that your discovery returns something that does not have {#IFNAME}macro defined. Anyway, this bug tracker is not the proper place to discuss this and sending messages to users is not supported. Please use one of the ways mentioned at https://www.zabbix.org/wiki/Getting_help . Users on #zabbix on Freenode or on the forum would be happy to help. |