David Lang | 15 Jul 21:23 2016

complex discovery question.

I have processes that watch logs and keep running totals of things from in the 
logs, each minute I then dump the totals.

I would like to put this data into Zabbix, but I need to understand how I can 
setup the templates for this (probably discovery templates)

I currently use active mode and have used zabbix-sender to send some of this 
data. I'm using 2.4 but would upgrade to 3.0 in a heartbeat if needed.

But I have other categories that are driven by the data in the logs, and so I 
think I am needing to do something with discovery to make things work.

As a trivial example, I want to graph how many logs I have from each server 
sending to me, and alert if any of them drop to zero.

The list of servers that send me data is going to change over time, but in any 
reasonable timeframe, it's going to be pretty static. Not all of the servers are 
monitored by Zabbix (think network devices monitored by another department), so 
I can't easily have my central log server add it to the sender's system in 
zabbix.

Ideally I want to have something like logs.received[foo] and be able to create a 
stacked graph of logs.received[*] or things like that.

Is there a way to setup an item that can have an arbitrary number of sub-items? 
Or is there a way to push discovery data to the server to give it the current 
list of items?

Is there another way to do what I'm talking about?

(Continue reading)

David Lang | 15 Jul 22:40 2016

Re: complex discovery question.

Yes, I've done this sort of thing in the past for sending the data. Can I send 
the discovery info in a similar way?

Even if I have to write something to talk directly to the Zabbix trapper code 
instead of being able to just use zabbix-sender.

David Lang

On Fri, 15 Jul 2016, Tolle, Matthew wrote:

> Date: Fri, 15 Jul 2016 20:29:16 +0000
> From: "Tolle, Matthew" <Matthew.Tolle <at> Level3.com>
> To: David Lang <david <at> lang.hm>
> Cc: Zabbix-Users <zabbix-users <at> lists.sourceforge.net>
> Subject: Re: [Zabbix-users] complex discovery question.
> 
>
> Sorry.. re-read your question and saw I may have missed something.
>
> Zabbix agent (active) does kind of push instead of pull but if you want to use zabbix sender you can do that as
well. Zabbix sender gives you a little more control over time frames that data is sent in and lets you send
bulk stats in. Nice if you are doing a bunch of stuff. To do something like that setup the same discovery rule
but for the item prototype do something like:
>
> Name: number of lines in log file prototype
> Type: Zabbix trapper
> key: logcount[{#LOG}]
>
> Make a script that does all the log file counts and writes it out to a temp file (or holds it in memory). The
format would be:
(Continue reading)

David Lang | 15 Jul 21:59 2016

Re: complex discovery question.

Thanks, a couple follow-up questions

Is it possible to do this in a push mode (something similar to zabbix-send)?

this is sending

{"data": ["{#LOG}":"foo","{#LOG}":"bar"]}

what happens if I later send:

{"data": ["{#LOG}":"foo"}

does the data for bar remain? or does it get deleted?

David Lang

On Fri, 15 Jul 2016, Tolle, Matthew wrote:

>
> On the monitored host change the agent config file to use user parameters. Something like:
>
> UserParameter=logfind[*],/usr/local/zabbix/bin/logfind.sh
> UserParameter=logcount[*],wc -l ‘$1’ | awk ‘{print $1}’
>
> (Might use cut instead of awk.. there are a number of ways todo both of these).
>
> for the logfind.sh script something like:
>
>   TOT=`ls /var/log/ | egrep '(log$)’ | wc -l`
>
(Continue reading)

Anthony Moon | 15 Jul 21:50 2016

passive proxy not respecting changes

Hey all,

 

I’m seeing some really odd behavior with our passive proxy, it does not seem to be respecting the changes made on the master server (I can see it still polling old items and not polling new hosts).

 

I’ve try reloading the config cache on the master, restarting the master and proxy, nothing is working; does anyone have any advice? Should I switch to active proxy mode?

 

Thanks

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Zabbix-users mailing list
Zabbix-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/zabbix-users
David Lang | 15 Jul 23:04 2016

Re: complex discovery question.

If I look at what gets sent back and forth when a normal discovery request 
happens and then send that same data (JSON HTTP post if I remember the 
protocol details correctly) to the Zabbix Trapper port, will that work? or will 
does it require that zabbix reach out to the agent to get the data?

David Lang

On Fri, 15 Jul 2016, Tolle, Matthew wrote:

> Nothing that I’m aware of.
>
> -Matt
>
>
> On Jul 15, 2016, at 1:40 PM, David Lang <david <at> lang.hm<mailto:david <at> lang.hm>> wrote:
>
> Yes, I've done this sort of thing in the past for sending the data. Can I send the discovery info in a similar way?
>
> Even if I have to write something to talk directly to the Zabbix trapper code instead of being able to just
use zabbix-sender.
>
> David Lang
>
> On Fri, 15 Jul 2016, Tolle, Matthew wrote:
>
> Date: Fri, 15 Jul 2016 20:29:16 +0000
> From: "Tolle, Matthew" <Matthew.Tolle <at> Level3.com<mailto:Matthew.Tolle <at> level3.com>>
> To: David Lang <david <at> lang.hm<mailto:david <at> lang.hm>>
> Cc: Zabbix-Users <zabbix-users <at> lists.sourceforge.net<mailto:zabbix-users <at> lists.sourceforge.net>>
> Subject: Re: [Zabbix-users] complex discovery question.
>
> Sorry.. re-read your question and saw I may have missed something.
>
> Zabbix agent (active) does kind of push instead of pull but if you want to use zabbix sender you can do that as
well. Zabbix sender gives you a little more control over time frames that data is sent in and lets you send
bulk stats in. Nice if you are doing a bunch of stuff. To do something like that setup the same discovery rule
but for the item prototype do something like:
>
> Name: number of lines in log file prototype
> Type: Zabbix trapper
> key: logcount[{#LOG}]
>
> Make a script that does all the log file counts and writes it out to a temp file (or holds it in memory). The
format would be:
>
> <Zabbix agent host name> <key> <data>
>
> Example:
>
>
myhost.mydomain.example.com<http://myhost.mydomain.example.com/><http://myhost.mydomain.example.com<http://myhost.mydomain.example.com/>>
logcount[/var/log/auth.log] 1456
>
myhost.mydomain.example.com<http://myhost.mydomain.example.com/><http://myhost.mydomain.example.com<http://myhost.mydomain.example.com/>>
logcount[/var/log/messages.log] 6346446
>
> etc..
>
> Then have the script run:
>
> zabbix_sender -vv -z <your zabbix server hostname> -s <agent name> -i <file>
>
> That will bulk send in all the data. You can send them in one at a time if you like by running:
>
> zabbix_sender -vv -z <your zabbix server hostname> -s <agent name> -k <key> -o <data>
>
> The key needs to match up with what the prototype has for this to work and the key has to be unique for each
item. Obviously the item has to be discovered before data will show up but it’s ok to send data before
hand. Zabbix will just ignore it till the key shows up.
>
> Put the script in cron or setup a daemon to run it whenever you want. I do a lot of zabbix_sender stuff when I
want to collect specific data on a daemon I wrote. It’s great for collecting and graphing response
times, memory used, etc.
>
> -Matt
>
> On Jul 15, 2016, at 12:59 PM, David Lang
<david <at> lang.hm<mailto:david <at> lang.hm><mailto:david <at> lang.hm>> wrote:
>
> Thanks, a couple follow-up questions
>
> Is it possible to do this in a push mode (something similar to zabbix-send)?
>
> this is sending
>
> {"data": ["{#LOG}":"foo","{#LOG}":"bar"]}
>
> what happens if I later send:
>
> {"data": ["{#LOG}":"foo"}
>
> does the data for bar remain? or does it get deleted?
>
> David Lang
>
> On Fri, 15 Jul 2016, Tolle, Matthew wrote:
>
>
> On the monitored host change the agent config file to use user parameters. Something like:
>
> UserParameter=logfind[*],/usr/local/zabbix/bin/logfind.sh
> UserParameter=logcount[*],wc -l ‘$1’ | awk ‘{print $1}’
>
> (Might use cut instead of awk.. there are a number of ways todo both of these).
>
> for the logfind.sh script something like:
>
> TOT=`ls /var/log/ | egrep '(log$)’ | wc -l`
>
> echo "{ \"data\": ["
>
> for i in `ls /var/log/ | egrep '(log$)' | awk '{print $1}' `;
>  do echo " { \”{#LOG}\":\"$i\" }"
>  NUM=`expr $NUM + 1`
>
>  if test "$NUM" -lt "$TOT"; then
>    echo ","
>  fi
>
> done
>
> echo "] }"
>
>
> In the Zabbix UI for discovery you use:
>
> Name: Log file finder
> Type: Zabbix agent (active)
> Key: log find[]
>
> Create an item prototype with that:
>
> Name: number of lines in log file prototype
> Type Zabbix agent (active)
> Key logcount[{#LOG}]
>
> The zabbix user on the host with the agent will need access to run the script, read the log directory, and the
files in the log directory.
>
> add some triggers and that should do it.
>
> this was just off the cuff and not tested so might need some tweaks. If it was me I’d merge those
userparamerters into one script that does both discovery and the counting.
>
> Hope that helps,
>
> -Matt
>
>
>
>
>
>
> On Jul 15, 2016, at 12:23 PM, David Lang
<david <at> lang.hm<mailto:david <at> lang.hm><mailto:david <at> lang.hm><mailto:david <at> lang.hm>> wrote:
>
> I have processes that watch logs and keep running totals of things from in the
> logs, each minute I then dump the totals.
>
> I would like to put this data into Zabbix, but I need to understand how I can
> setup the templates for this (probably discovery templates)
>
> I currently use active mode and have used zabbix-sender to send some of this
> data. I'm using 2.4 but would upgrade to 3.0 in a heartbeat if needed.
>
> But I have other categories that are driven by the data in the logs, and so I
> think I am needing to do something with discovery to make things work.
>
> As a trivial example, I want to graph how many logs I have from each server
> sending to me, and alert if any of them drop to zero.
>
> The list of servers that send me data is going to change over time, but in any
> reasonable timeframe, it's going to be pretty static. Not all of the servers are
> monitored by Zabbix (think network devices monitored by another department), so
> I can't easily have my central log server add it to the sender's system in
> zabbix.
>
> Ideally I want to have something like logs.received[foo] and be able to create a
> stacked graph of logs.received[*] or things like that.
>
> Is there a way to setup an item that can have an arbitrary number of sub-items?
> Or is there a way to push discovery data to the server to give it the current
> list of items?
>
> Is there another way to do what I'm talking about?
>
> David Lang
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.http://sdm.link/zohodev2dev
> _______________________________________________
> Zabbix-users mailing list
> Zabbix-users <at> lists.sourceforge.net<mailto:Zabbix-users <at> lists.sourceforge.net><mailto:Zabbix-users <at> lists.sourceforge.net><mailto:Zabbix-users <at> lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/zabbix-users
>
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Zabbix-users mailing list
Zabbix-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/zabbix-users
David Lang | 15 Jul 22:12 2016

Re: complex discovery question.

That sounds reasonable, what about the other part of the question.

Is it possible to send this discovery data unsolicited in a push?

What I'm actually starting with is json data that is something like:

{ "name": "msgs_per_host", "origin": "dynstats.bucket", "values": { 
"192.168.99.2": 15983, "ilog209": 31}

that I then loop through the values section to produce both the discover data 
and the item data.

I can trivially produce the data to feed to zabbix-sender, and would like to 
either push the discover text to zabbix-sender as well, or to create a 
fork/replacement for zabbix-sender that can handle it.

David Lang

On Fri, 15 Jul 2016, Tolle, Matthew wrote:

> The discovered item “bar” will stick around for the defined “Keep lost resources period (in
days)” you set on the findlog discovery item. After that it, and it’s data, will go away.
>
> -Matt
>
>
> On Jul 15, 2016, at 12:59 PM, David Lang <david <at> lang.hm<mailto:david <at> lang.hm>> wrote:
>
> Thanks, a couple follow-up questions
>
> Is it possible to do this in a push mode (something similar to zabbix-send)?
>
> this is sending
>
> {"data": ["{#LOG}":"foo","{#LOG}":"bar"]}
>
> what happens if I later send:
>
> {"data": ["{#LOG}":"foo"}
>
> does the data for bar remain? or does it get deleted?
>
> David Lang
>
> On Fri, 15 Jul 2016, Tolle, Matthew wrote:
>
>
> On the monitored host change the agent config file to use user parameters. Something like:
>
> UserParameter=logfind[*],/usr/local/zabbix/bin/logfind.sh
> UserParameter=logcount[*],wc -l ‘$1’ | awk ‘{print $1}’
>
> (Might use cut instead of awk.. there are a number of ways todo both of these).
>
> for the logfind.sh script something like:
>
> TOT=`ls /var/log/ | egrep '(log$)’ | wc -l`
>
> echo "{ \"data\": ["
>
>  for i in `ls /var/log/ | egrep '(log$)' | awk '{print $1}' `;
>    do echo " { \”{#LOG}\":\"$i\" }"
>    NUM=`expr $NUM + 1`
>
>    if test "$NUM" -lt "$TOT"; then
>      echo ","
>    fi
>
>  done
>
>  echo "] }"
>
>
> In the Zabbix UI for discovery you use:
>
> Name: Log file finder
> Type: Zabbix agent (active)
> Key: log find[]
>
> Create an item prototype with that:
>
> Name: number of lines in log file prototype
> Type Zabbix agent (active)
> Key logcount[{#LOG}]
>
> The zabbix user on the host with the agent will need access to run the script, read the log directory, and the
files in the log directory.
>
> add some triggers and that should do it.
>
> this was just off the cuff and not tested so might need some tweaks. If it was me I’d merge those
userparamerters into one script that does both discovery and the counting.
>
> Hope that helps,
>
> -Matt
>
>
>
>
>
>
> On Jul 15, 2016, at 12:23 PM, David Lang
<david <at> lang.hm<mailto:david <at> lang.hm><mailto:david <at> lang.hm>> wrote:
>
> I have processes that watch logs and keep running totals of things from in the
> logs, each minute I then dump the totals.
>
> I would like to put this data into Zabbix, but I need to understand how I can
> setup the templates for this (probably discovery templates)
>
> I currently use active mode and have used zabbix-sender to send some of this
> data. I'm using 2.4 but would upgrade to 3.0 in a heartbeat if needed.
>
> But I have other categories that are driven by the data in the logs, and so I
> think I am needing to do something with discovery to make things work.
>
> As a trivial example, I want to graph how many logs I have from each server
> sending to me, and alert if any of them drop to zero.
>
> The list of servers that send me data is going to change over time, but in any
> reasonable timeframe, it's going to be pretty static. Not all of the servers are
> monitored by Zabbix (think network devices monitored by another department), so
> I can't easily have my central log server add it to the sender's system in
> zabbix.
>
> Ideally I want to have something like logs.received[foo] and be able to create a
> stacked graph of logs.received[*] or things like that.
>
> Is there a way to setup an item that can have an arbitrary number of sub-items?
> Or is there a way to push discovery data to the server to give it the current
> list of items?
>
> Is there another way to do what I'm talking about?
>
> David Lang
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.http://sdm.link/zohodev2dev
> _______________________________________________
> Zabbix-users mailing list
> Zabbix-users <at> lists.sourceforge.net<mailto:Zabbix-users <at> lists.sourceforge.net><mailto:Zabbix-users <at> lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/zabbix-users
>
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Zabbix-users mailing list
Zabbix-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/zabbix-users
Anthony Moon | 14 Jul 02:03 2016

SNMPv3 templates

Hey Zabbix users,

 

Does anyone have any templates for SNMPV3? Trying to get it working for Linux hosts..

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Zabbix-users mailing list
Zabbix-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/zabbix-users
Jeff Baldwin | 8 Jun 06:09 2016

Running Zabbix Server 3.0 - Which Agent for Ubuntu 12.04?

All,

 

I am running Zabbix Server 3.0.   Some of the hosts I need to monitor are running Ubuntu 12.04, and I prefer to run the Zabbix agent for monitoring Linux hosts.

 

The only Zabbix agen I see which supports Ubuntu 12.04 is the 2.2 Zabbix Agent.   Is it okay to  use Zabbix Agent v2.2 with Zabbix Server v3.0?

 

Any issues/concerns which I should be aware of?

 

Jeff

 Jeff Baldwin
 



 8335 Classic Drive
 Charlotte, NC 28262 
 800.368.1056 toll free
 
 704.597.9015 main 
 knowclassic.com

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Zabbix-users mailing list
Zabbix-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/zabbix-users
Anthony Moon | 8 Jun 02:39 2016

Aggregate eth0 in/out octets

Hey all,

 

I’m trying to aggregate SNMP interface octets via a calculated item:

 

last("grpsum["VANH_Proxy","ifHCInOctets[eth0]","last"]")

 

Zabbix is saying that it cannot evaluate this function as the item does not exist.

 

I’m really new to Zabbix so I am sure I am doing this wrong, any tips?

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Zabbix-users mailing list
Zabbix-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/zabbix-users
Guy Knights | 7 Jun 21:06 2016
Picon

Re: Obtaining extra host metadata via network discovery

Oh wow, I'd never noticed the "populates host inventory" field option before. This might be just what I need.

I agree that automation is the way to go. I mean, I could modify the visible name field for each host manually, but it's not really tenable in the long term. I'll take a look at the Zabbix API in more depth, I think I could probably script something with Ansible (our config mgmt tool of choice) to update the visible name field when we update host configs or something like that.

Thanks again for your help!
Guy

On Tue, Jun 7, 2016 at 11:57 AM, Tolle, Matthew <Matthew.Tolle <at> level3.com> wrote:

Just a shot from the hip.. there may be a better way but this may work:

Create a UserParameter or a zabbix_sender item that sends the hostname in. Create an Item for that data. When creating the item use the “Populates host inventory field” and pick something like “Asset Tag” or something that you aren’t using. Then in the action section add {INVENTORY.Asset.TAG1} to the default message.

If you want to get super nerdy on it you could do what we do. We populate our zabbix setup out of a CMDB deployment. When we do that we fill out both the “Host name” as reported by the host and the “visible name” as reported by the zabbix agent. Just in case they are different. You could do the same thing but fill one our with the AWS name. A great deal more work but gives you the ability to search for both names in the Zabbix GUI and find what you are looking for. You would also need to pass both names in the actions. Same as above.

The zabbix API is very robust and easy to use once you get going. We use it a great deal to automate as much as we can to make our lives easier. We’ve got 10k+ hosts a number of secondary feeders (Like OEM, netcool, etc) and we use zabbix to feed ServiceNow for ticketing also out of the API. All with very little human interaction to zabbix day to day.

-Matt





On Jun 7, 2016, at 11:28 AM, Guy Knights <guy.knights <at> gmail.com<mailto:guy.knights <at> gmail.com>> wrote:

Thanks guys, I hadn't really thought about doing it that way.

The issue I'm really trying to solve here is that I'm working in AWS, and by default AWS hostnames are based on IP addresses, which is fine for the most part. However, when we get alerts it's a bit of a hassle to cross-reference the IPs with the "Name" tag I've allocated each host in the AWS console. FYI, this name tag isn't completely unique, it's a string of info that just identifies the purpose of each host. Anyway, what I would like is a way to pass this info to zabbix so that it will send it out in notification alerts.

What I've just done recently is add {TRIGGER.HOSTGROUP.NAME<http://trigger.hostgroup.name/>} to my alert messages, which basically does the job, but it would be nice to be able to pass very specific info from my agents to zabbix and have zabbix be able to use this info both for alerts and also maybe in the zabbix interface so we can see at a glance what each host's job is.

I guess my question is - if I use the technique you suggested (user parameters) is there a way to use the returned info in general, in the way I described above? So, set up items to check these user parameters, but then use the values in these items as macros in other triggers, or  in a host's visible name? This is where I'm a bit fuzzy.

Thanks again for your help,
Guy

On Tue, Jun 7, 2016 at 11:08 AM, Tolle, Matthew <Matthew.Tolle <at> level3.com<mailto:Matthew.Tolle <at> level3.com>> wrote:

On agent side:

UserParameter=get.agent.conf[*],grep -s "^$1=“ <PathToConfDir>/*.conf

>From the server/proxy:

./zabbix_get -s <ip> -k get.agent.conf[Hostname]

would return:

HostnameItem=system.hostname

or whatever you have set. You can also use that key in the Zabbix item.

Very flexible. You can do all kinds of fun things like:

UserParameter=count.pw<http://count.pw/><http://count.pw<http://count.pw/>>[*],wc -l /etc/passwd | cut -d’ ‘ -f1

Make an item count.pw<http://count.pw/><http://count.pw<http://count.pw/>> in the GUI and graph the number of entries in the password file. Not very useful but gives you an idea on what you can do. sendmail queue files, number of open files, number or ssh sessions.. etc, etc..

Just make sure you don’t get overly excited about it and and create a security hole.

If you are doing something often, something that takes a bunch of times, or doing a bunch of checks like these, you should used the zabbix_sender to have the agent feed zabbix indeed of the server or proxy pulling the data. zabbix_sender -i <input file> is da bomb. :)

("da bomb" is still used right?)

-Matt



On Jun 7, 2016, at 8:30 AM, Alexei Vladishev <alexei.vladishev <at> zabbix.com<mailto:alexei.vladishev <at> zabbix.com><mailto:alexei.vladishev <at> zabbix.com<mailto:alexei.vladishev <at> zabbix.com>>> wrote:

I believe you may create a simple user parameter that would parse zabbix_agentd.conf and return meta data back.

Kind regards,
Alexei


On 07 Jun 2016, at 05:51, Guy Knights <guy.knights <at> gmail.com<mailto:guy.knights <at> gmail.com><mailto:guy.knights <at> gmail.com<mailto:guy.knights <at> gmail.com>>> wrote:

I know you can configure host metadata in the agent configuration but AFAIK this is only used by the auto-registration action, which I'm not using. Is it possible to get access to and record/use this data during a network discovery action? I'd like to pass along some extra identifying info from my zabbix agents.

Thanks,
Guy
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e_______________________________________________
Zabbix-users<https://ad.doubleclick.net/ddm/clk/305295220;132659582;e_______________________________________________Zabbix-users> mailing list
Zabbix-users <at> lists.sourceforge.net<mailto:Zabbix-users <at> lists.sourceforge.net><mailto:Zabbix-users <at> lists.sourceforge.net<mailto:Zabbix-users <at> lists.sourceforge.net>>
https://lists.sourceforge.net/lists/listinfo/zabbix-users


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Zabbix-users mailing list
Zabbix-users <at> lists.sourceforge.net<mailto:Zabbix-users <at> lists.sourceforge.net><mailto:Zabbix-users <at> lists.sourceforge.net<mailto:Zabbix-users <at> lists.sourceforge.net>>
https://lists.sourceforge.net/lists/listinfo/zabbix-users




------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Zabbix-users mailing list
Zabbix-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/zabbix-users
Guy Knights | 7 Jun 20:28 2016
Picon

Re: Obtaining extra host metadata via network discovery

Thanks guys, I hadn't really thought about doing it that way.

The issue I'm really trying to solve here is that I'm working in AWS, and by default AWS hostnames are based on IP addresses, which is fine for the most part. However, when we get alerts it's a bit of a hassle to cross-reference the IPs with the "Name" tag I've allocated each host in the AWS console. FYI, this name tag isn't completely unique, it's a string of info that just identifies the purpose of each host. Anyway, what I would like is a way to pass this info to zabbix so that it will send it out in notification alerts. 

What I've just done recently is add {TRIGGER.HOSTGROUP.NAME} to my alert messages, which basically does the job, but it would be nice to be able to pass very specific info from my agents to zabbix and have zabbix be able to use this info both for alerts and also maybe in the zabbix interface so we can see at a glance what each host's job is.

I guess my question is - if I use the technique you suggested (user parameters) is there a way to use the returned info in general, in the way I described above? So, set up items to check these user parameters, but then use the values in these items as macros in other triggers, or  in a host's visible name? This is where I'm a bit fuzzy.

Thanks again for your help,
Guy

On Tue, Jun 7, 2016 at 11:08 AM, Tolle, Matthew <Matthew.Tolle <at> level3.com> wrote:

On agent side:

UserParameter=get.agent.conf[*],grep -s "^$1=“ <PathToConfDir>/*.conf

>From the server/proxy:

./zabbix_get -s <ip> -k get.agent.conf[Hostname]

would return:

HostnameItem=system.hostname

or whatever you have set. You can also use that key in the Zabbix item.

Very flexible. You can do all kinds of fun things like:

UserParameter=count.pw<http://count.pw>[*],wc -l /etc/passwd | cut -d’ ‘ -f1

Make an item count.pw<http://count.pw> in the GUI and graph the number of entries in the password file. Not very useful but gives you an idea on what you can do. sendmail queue files, number of open files, number or ssh sessions.. etc, etc..

Just make sure you don’t get overly excited about it and and create a security hole.

If you are doing something often, something that takes a bunch of times, or doing a bunch of checks like these, you should used the zabbix_sender to have the agent feed zabbix indeed of the server or proxy pulling the data. zabbix_sender -i <input file> is da bomb. :)

("da bomb" is still used right?)

-Matt



On Jun 7, 2016, at 8:30 AM, Alexei Vladishev <alexei.vladishev <at> zabbix.com<mailto:alexei.vladishev <at> zabbix.com>> wrote:

I believe you may create a simple user parameter that would parse zabbix_agentd.conf and return meta data back.

Kind regards,
Alexei


On 07 Jun 2016, at 05:51, Guy Knights <guy.knights <at> gmail.com<mailto:guy.knights <at> gmail.com>> wrote:

I know you can configure host metadata in the agent configuration but AFAIK this is only used by the auto-registration action, which I'm not using. Is it possible to get access to and record/use this data during a network discovery action? I'd like to pass along some extra identifying info from my zabbix agents.

Thanks,
Guy
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e_______________________________________________
Zabbix-users
mailing list
Zabbix-users <at> lists.sourceforge.net<mailto:Zabbix-users <at> lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/zabbix-users


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Zabbix-users mailing list
Zabbix-users <at> lists.sourceforge.net<mailto:Zabbix-users <at> lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/zabbix-users


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Zabbix-users mailing list
Zabbix-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/zabbix-users

Gmane