Code Monkey home page Code Monkey logo

chef-serverdensity's People

Contributors

1stvamp avatar akatz avatar asurak avatar borgified avatar bricker avatar carlosperello avatar davidmytton avatar dlackty avatar harryperks avatar jonty avatar jpgriffo avatar kierenevans avatar mal avatar nassimhc avatar nklya avatar shanethehat avatar shurl avatar thijsc avatar tomwardill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chef-serverdensity's Issues

Version 3.0.2 generates error when using default attributes

Hi,

With version 3.0.2 the following error occurs in the /var/log/sd-agent/collector.log on CentOS 6.x. This error is generated with default attributes set.

2016-09-22 11:48:07 CEST | ERROR | sd.collector | config(config.py:859) | Unable to parse yaml config in /etc/sd-agent/conf.d/directory.yaml
Traceback (most recent call last):
  File "/usr/share/python/sd-agent/config.py", line 857, in _load_file_config
    check_config = check_yaml(config_path)
  File "/usr/share/python/sd-agent/util.py", line 170, in check_yaml
    raise Exception('You need to have at least one instance defined in the YAML file for this check')
Exception: You need to have at least one instance defined in the YAML file for this check

The process will continue to run however. We have updated from version 3.0.1 to 3.0.2. The changes from a chef-client run, see below:

Recipe: serverdensity::default
  * chef_gem[rest-client] action install (up to date)
  * yum_repository[serverdensity] action create
    * template[/etc/yum.repos.d/serverdensity.repo] action create (up to date)
    * execute[yum clean metadata serverdensity] action nothing (skipped due to action :nothing)
    * execute[yum-makecache-serverdensity] action nothing (skipped due to action :nothing)
    * ruby_block[yum-cache-reload-serverdensity] action nothing (skipped due to action :nothing)
     (up to date)
  * yum_package[sd-agent] action install (up to date)
  * service[sd-agent] action nothing (skipped due to action :nothing)
  * serverdensity[hostname.org] action update
    - fetch Server Density agent key
  Recipe: <Dynamically Defined Resource>
    * template[/etc/sd-agent/conf.d/agent.cfg] action create
      - update content in file /etc/sd-agent/conf.d/agent.cfg from 28081e to c456bf
      --- /etc/sd-agent/conf.d/agent.cfg    2016-09-08 10:16:49.865005466 +0200
      +++ /tmp/chef-rendered-template20160922-22057-17vfarj 2016-09-22 11:47:56.120873757 +0200
      @@ -25,5 +25,5 @@
       # if syslog is enabled but a host and port are not set, a local domain socket
       # connection will be attempted
       log_to_syslog: yes
      -listen_port: 17123
      +listen_port: 17124
      - restore selinux security context
    * link[/etc/sd-agent/config.cfg] action create (up to date)
    * service[sd-agent] action restart
      - restart service service[sd-agent]

Recipe: serverdensity::default
  * yum_package[sd-agent-directory] action install (up to date)
  * template[/etc/sd-agent/conf.d/directory.yaml] action create
    - update content in file /etc/sd-agent/conf.d/directory.yaml from 63fa92 to 0673ef
    --- /etc/sd-agent/conf.d/directory.yaml 2016-09-08 10:17:00.005131488 +0200
    +++ /tmp/chef-rendered-template20160922-22057-x5spmd    2016-09-22 11:48:04.482976762 +0200
    @@ -17,9 +17,4 @@
       # "filegauges" - boolean, when true stats will be an individual gauge per file (max. 20 files!) and not a histogram of the whole directory. default False
       # "pattern" - string, the `fnmatch` pattern to use when reading the "directory"'s files. default "*"
       # "recursive" - boolean, when true the stats will recurse into directories. default False
    -  - directory: ""
    -    # name: "tag_value"
    -    # filegauges: False
    -    # pattern: "*.log"
    -    # recursive: True
    - restore selinux security context

Service support

I would like to be able to create service check and alert for it using sd cookbook. Is it possible at the moment?

Tags in the device metadata are not set

I'm trying to pass some tags in device metadata. The devices are created as expected, but they are not tagged. I'm certain that the tag IDs I'm passing are correct.

This is the role where my config is defined:

{
  "name": "monitored",
  "description": "Monitored",
  "json_class": "Chef::Role",
  "default_attributes": {
    "serverdensity": {
      "token": "xxxxxxxxxxxxxxx",
      "account": "xxxxxxx.serverdensity.io",
      "device_group": "xxxxxxxx"
    },
    "serverdensity-xxxxxxxx": {
      "tags": [
        "xxxxxxxxxxxx",
        "xxxxxxxxxxxx"
      ]
    }
  },
  "override_attributes": {
  },
  "chef_type": "role",
  "run_list": [
    "recipe[serverdensity-xxx]"
  ],
  "env_run_lists": {
  }
}

And this is the serverdensity-xxx default recipe:

include_recipe 'serverdensity'

serverdensity node.name do
  metadata :tags => node['serverdensity-xxx']['tags']
end

Unable to acquire a ServerDensity agent_key

I have recently started getting the error "RuntimeError: Unable to acquire a ServerDensity agent_key" on a server that has previously installed the agent successfully. The agent is still reporting and monitoring data is coming in, but I am unable to reprovision the server. Any ideas what I can do to debug this?

could not find recipe epel for cookbook yum

I am getting the following on Centos 6.5:

Recipe Compile Error

Chef::Exceptions::RecipeNotFound

could not find recipe epel for cookbook yum

Since yum cookbook (3.X) yum::epel recipe has been moved to a new yum-epel cookbook.

API is never called

Not sure what this line is meant to do. I can't find much information on the IP, but whatever it does (it doesn't ever seem to get an agent_key), it doesn't throw an exception either, so it never hits the rescue and as a result never looks up servers with the API.

Need an explicit error when the creation of a device fails with the return JSON of the error

We use a test box that always has the same hostname to test our server deployments, when we were trying to get server density installed we kept getting the following error:

#<NoMethodError: undefined method `response' for #<NameError:0x00000004227b68>>
       [2015-01-23T10:36:01+00:00] WARN: Unable to create device on Serverdensity

I was on with support and they said that this is most likely because the same key exists in the account and that would be stated in the return JSON.

If we could just print out the return JSON when there is an error that would be really useful and would have allowed us to figure out this problem much earlier.

LWRP

I've rewritten this cookbook with a focus on LWRPs since that better fits the way we utilize cookbooks. It's working well with v1 and has been pointed at v2 on occasion too.

The docs have been updated, but could probably use a bit more work

Is this a change you'd consider for the official cookbook (if so I'll roll a PR)?

Code here: https://github.com/mal/chef-serverdensity/tree/lwrp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.