Re: [Puppet Users] masterless puppet agent metrics, status reporting via ELK stack
Hi Walid, I *think* this may be what you're looking for: https://github.com/logstash/puppet-logstash-reporter It is a Puppet report handler that sends event and metric details of agent runs to Logstash via TCP input. See the following page for more information about the various metrics that are collected: https://docs.puppetlabs.com/guides/reporting.html#metrics Since you're asking about doing this in masterless mode, you may want to have a look through the following thread which gives some tips about how to do that. https://groups.google.com/forum/#!topic/puppet-users/Z8HncQqEHbc Hope that helps. -- Bill On 08/07/2014 06:51 AM, Walid wrote: Hi, I am looking for hints, pointers, URLS about collecting puppet metrics and agent status using logstash filters? kind regards Walid -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com mailto:puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAN4dctqxKhufQF1421hqduihtDHW7EB17zBwFd3N3K4m4yq2zw%40mail.gmail.com https://groups.google.com/d/msgid/puppet-users/CAN4dctqxKhufQF1421hqduihtDHW7EB17zBwFd3N3K4m4yq2zw%40mail.gmail.com?utm_medium=emailutm_source=footer. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/53E37CAC.1020801%40pythian.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] exec in a source file?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Stan, You could try setting refreshonly to 'true' in the exec, that way it will only run when the /etc/fstab file it is subscribed to changes. However, I don't know if this will work as you're only ensuring the file is present. http://docs.puppetlabs.com/references/latest/type.html#exec Alternatively, you could add disk information in a separate configuration file (say, /etc/snmp/snmpd.conf.disk) that is included by the main configuration using an include directive, like this: include /etc/snmp/snmpd.conf.disk And then change your exec resource to output the result to /etc/snmp/snmpd.conf.disk instead. Hope that helps, Bill On 05/30/2013 01:32 PM, Stan wrote: -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGnk9QACgkQ5xgg9J6hpUthFgCfUSFpOSoieOxfujGgZhMZp5Qo +yoAn37BL1lFkwiA/o/jzfyOS0qizM8C =QWOk -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] exec in a source file?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Stan, You could try setting refreshonly to 'true' in the exec, that way it will only run when the /etc/fstab file it is subscribed to changes. However, I don't know if this will work as you're only ensuring the file is present. http://docs.puppetlabs.com/references/latest/type.html#exec Alternatively, you could add disk information in a separate configuration file (say, /etc/snmp/snmpd.conf.disk) that is included by the main configuration using an include directive, like this: include /etc/snmp/snmpd.conf.disk And then change your exec resource to output the result to /etc/snmp/snmpd.conf.disk instead. Hope that helps, Bill On 05/30/2013 01:32 PM, Stan wrote: Hello Here is my manifest for snmpd, my problem now is that my manifest will run every time because my snmpd.conf file changes after the exec!! I want that my manifest run when the snmpd.conf (only snmpd.conf source and not with exec) file change or when my /etc/fstab file on the client change and it restart the snmpd service. I do not know if I'm very clear, but it is not easy to explain it in English. Did you have an idea? class snmpd::redhat { package { net-snmp: ensure = present, } file { /etc/snmp/snmpd.conf: ensure = present, owner = 'root', group = 'root', mode = 644, source = puppet:///modules/snmpd/snmpd.conf, require= Package[net-snmp], notify = Exec[disk-snmp] #notify = Service[snmpd] } file { /etc/fstab: ensure = present } exec { disk-snmp: command = grep -e \ext[2-4]\ /etc/fstab|awk '{print \disk\,'$\2'}' /etc/snmp/snmpd.conf, # subscribe = File[/etc/snmp/snmpd.conf], subscribe = File[/etc/fstab], path = [/usr/bin, /bin, /usr/sbin], notify = Service[snmpd] } service { snmpd: ensure = running, hasstatus = true, hasrestart = true, enable = true, require= File['/etc/snmp/snmpd.conf'] } } my source : snmpd.conf : com2sec nagios 192.168.1.1 communaute view tout included .1 group collecte v1 cacti access collecte any noauth exact tout none none syslocation Unknown (edit /etc/snmp/snmpd.conf) syscontact Root root@localhost (configure /etc/snmp/snmp.local.conf) pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat Is it possible in my snmpd.conf source a solution as : com2sec nagios 192.168.1.1 communaute view tout included .1 group collecte v1 cacti access collecte any noauth exact tout none none syslocation Unknown (edit /etc/snmp/snmpd.conf) syscontact Root root@localhost (configure /etc/snmp/snmp.local.conf) pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat *Exec **[disk-snmp]* -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGnk9QACgkQ5xgg9J6hpUuvZgCfUCe4ymWQW83x8YZOYdR8q7DA Va8AoIL+gF0uF0OXNsv8YDpKfyPDhmXL =z7Jy -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Searching for Nodes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Brian, The use case you are describing lends itself toward making use of stored configuration and exported resources. http://docs.puppetlabs.com/guides/exported_resources.html http://projects.puppetlabs.com/projects/1/wiki/Using_Stored_Configuration Additionally, if you are using haproxy as your load balancing solution, there is already a module available that uses these features. https://github.com/puppetlabs/puppetlabs-haproxy Hope that helps. Regards, Bill On 13-01-24 10:55 AM, Brian Malinconico wrote: Hello All, I'm reviewing switching to puppet from chef and am trying to identify how to port the various features. I have hit a stumbling block searching for nodes. In Chef i could search for a node by role, but I am lost as how to do this with puppet and classes. Example: I want my load-balancing node to look for all application server nodes and grab their ip address (and hostname ideally). I have setup PuppetDB, and have looked at http://forge.puppetlabs.com/dalen/puppetdbquery but i am having trouble crafting my queries. Is there a way to view all available fields in PuppetDB? I am having trouble getting the curl commands to work. Brian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlEBdWkACgkQ5xgg9J6hpUsklgCgjXsyhln4BB0dDjXhxjXCi+NS KsYAn1eHbYeNW5eW14gIrSuTWBr/zYjX =cRgN -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Puppet Dashboard inventory search problems.
Sounds like this bug: http://projects.puppetlabs.com/issues/14974 On 12-10-05 10:22 AM, llowder wrote: I'm using Dashboard 1.2.10 on an Ubuntu 10.04 LTS system, and Puppet 2.7.19 When I do an inventory search, I get a blank screen. In the logs, I found the following: Processing NodesController#search (for X.X.X.X at 2012-10-05 08:44:57) [GET] Parameters: {action=search, controller=nodes, search_params=[{fact=OSFamily, comparator=eq, value=Debian}]} Errno::EIO (Input/output error): /usr/lib/ruby/1.8/net/http.rb:564:in `write' /usr/lib/ruby/1.8/net/http.rb:564:in `warn' /usr/lib/ruby/1.8/net/http.rb:564:in `connect' /usr/lib/ruby/1.8/net/http.rb:553:in `do_start' /usr/lib/ruby/1.8/net/http.rb:542:in `start' lib/puppet_https.rb:18:in `make_ssl_request' lib/puppet_https.rb:33:in `get' app/models/node.rb:85:in `find_from_inventory_search' app/controllers/nodes_controller.rb:44 app/controllers/nodes_controller.rb:40:in `search' sass (3.1.2) [v] rails/./lib/sass/plugin/rack.rb:54:in `call' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' Rendering /usr/share/puppet-dashboard/public/500.html (500 Internal Server Error) Any ideas as to the cause? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Using Exported Resources in nginx loadbalancer conf
Hi Jon, I have seen something similar done with Puppet Labs' haproxy module: https://github.com/puppetlabs/puppetlabs-haproxy Essentially the balancer members export information about themselves (hostname, port, listening service, etc) which is collected by a balancer server. The configuration is then pieced together using the concat module. I believe that is what you are trying to accomplish here, and hopefully you find it useful to see how it is done in another module. Regards, Bill On 12-09-25 07:03 AM, Jon Ward wrote: Hi all, I'm attempting to use exported resources to dynamically generate an nginx config file. What I'd like to do if have all my web servers export their hostname inside a file resource, and have these collected by my loadbalancer and used in the config file, restarting nginx if anything has changed. There is an example of something very similar in Pro Puppet on pages 145-146 using Apache. In the example the individual hostnames are gathered by apache inside the balancer block using an include statement, however it doesn't seem possible to do this in an upstream block in nginx. So I think I need to somehow gather the hostnames into an array which I then use inside my conf file erb template to create the upstream server entries. My problem is how to do this. If I create a custom fact this will get evaluated before (I think) the resources are exported and gathered. If I use a custom function or some ruby inside the erb template that's evaluated on the master, not the agent. I do have a puppet agent running on the master server so I could collect the exported resources there and use a function, that's the best solution I can think of at the moment, just wondering if anyone else out there has had any success doing something like this? Thanks, Jon -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] collect facter output of puppet client remotely from the puppetmaster
On 12-09-20 10:36 PM, Hiu wrote: hi all, I would like to gather for the information that facter -p from the puppet client from a puppet master. How can i do it? thanks! Hi, Fact data of managed nodes is available in YAML format in the following directory on the Puppet master: /var/lib/puppet/yaml/node/ Hope that helps. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Puppet updated yum packages without logging?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Matthew, According to the source, defaultto is set to 'installed', of which 'present' is an alias. https://github.com/puppetlabs/puppet/blob/master/lib/puppet/type/package.rb Which means no package updates should have occurred. As for why they did and why nothing was logged .. that I don't know. Regards, Bill Fraser System Administrator Pythian On 12-07-26 10:37 AM, Matthew Barr wrote: We just saw an interesting scenario: Puppet 2.7.18 updated packages on a RHEL 6.2 box to a newer version without logging that fact. We've already fixed our code so it doesn't happen again, but I'm wondering if this is expected behavior or a bug. * I presume the default ensure behavior on package is latest? The type reference doesn't say that… * For now, we've switched to using ensure = present… but I'd have liked the logs to reflect that update. Details, if necessary: Now, we had the code as such: package { php:; php-common:; php-xml:; php-domxml;: } and there was a single not present package to install (php-domxml). Interestingly, the package was actually an older package name that's now handled by a new package (php-xml), which meant that the actual message logged was a failure. Jul 25 14:09:43 web01 puppet-agent[1021]: (/Stage[main]/Php/Package[php-domxml]/ensure) change from absent to present failed: Could not find package php-domxml This was the only package message logged, and yet we ended up with newer versions. Matthew Barr Technical Architect E: mb...@snap-interactive.com AIM: matthewbarr1 c: (646) 727-0535 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlARkCUACgkQ5xgg9J6hpUt/qACg2oEH5x7qEb2X9YxFbYZh9i+G Q6EAnRiwQY4bpqKc+SLA6XgUm7z/LJ/S =8Sxe -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Specifying Puppet Modules For EC2 Instances
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I recommend reading Mathias Gug's blog posts about Puppet support for UEC/EC2 in Ubuntu images, as it describes in detail the process you're working through. http://ubuntumathiaz.wordpress.com/2010/03/24/using-puppet-in-uecec2-puppet-support-in-ubuntu-images/ https://ubuntumathiaz.wordpress.com/2010/03/25/using-puppet-in-uecec2-automating-the-signing-process/ http://ubuntumathiaz.wordpress.com/2010/04/07/using-puppet-in-uecec2-node-classification-4/ Specifically, it covers using a Python script to launch an instance, creating and storing the instance's SSL certificate and node definitions in an S3 bucket, automating signing of the SSL certificate, and using another Python script as a node classifier to retrieve the node's definition from the S3 bucket. Regards, Bill On 12-05-15 05:17 PM, Brian Carpio wrote: Currently I am using ec2-run-instances to deploy Ubuntu instances to EC2. I am also calling a user-data-file to install puppet and make sure puppet registeres with the right puppetmaster, that is all working great, the default puppet modules are applied... However, is there a way from the node in the user-data-file to actually specify which other or application specific modules I'd like to apply to my instance? Or do I have to wait for the node to build then define it in my nodes.pp file? -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+z9jsACgkQ5xgg9J6hpUs0yQCfcB6BWHpw7F81EeZeONPqt9x/ lT8AnA91DYJeQ6EhHZWFAZV2YrpzWBYs =yoOD -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. attachment: fraser.vcf