puppet-zabbix icon indicating copy to clipboard operation
puppet-zabbix copied to clipboard

Question on how to add zabbixapi user to zabbix via forge module

Open maxfactor1 opened this issue 5 years ago • 1 comments

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: pe-puppet-enterprise-release-2017.3.5
  • Ruby: ruby-2.0.0.648-30.el7.x86_64
  • Distribution: Oracle Linux 7
  • Module version: mod 'puppet-zabbix', '6.4.0'

Hello,

I have noticed in some modules that there is a reference to the 'zabbixapi' user, specifically in the zabbix::web portion lines 85-89:

# [*zabbix_api_user*] # Name of the user which the api should connect to. Default: Admin # # [*zabbix_api_pass*] # Password of the user which connects to the api. Default: zabbix

However I am not sure how to create the user via this forge module. Is this possible or should I put in to my workflow to log in to the application and create the user manually?

Also this is un-related, but any guidance on creative ways to add hosts to templates would be great. Right now I am using a custom ruby script to scrape the puppetdb and add users via zabbix-api, which works, but would prefer an 'official' method if there is one.

maxfactor1 avatar Aug 15 '18 15:08 maxfactor1

Hi, you need to configure the user in the web UI, the puppet module currently can't handle that. I recommend the zabbix auto registration: https://www.zabbix.com/documentation/3.4/manual/discovery/auto_registration

You can use this module to configure the HostMetadata and HostnameItem item. I always set the HostMetadata to the name of the puppet role. Afterwards you can filter based on those values within the zabbix server UI and automatically add the new agent to the database and assign templates. ServerActive needs to be set, the agent will connect to that ip address.

bastelfreak avatar Aug 15 '18 16:08 bastelfreak