lib/sensu/extensions/check-deps.rb
# Will post Slack message to channel sensu
Will post Slack message to channel sensu
Will post Slack message to channel sensu
def writeToSlack(message, err=false)
            webhook = "T02B3AJ9B/BAYDG2VHN/jOVR3fy8AG5O7Y4ftTfNzon7"
            webhookUrl = "https://hooks.slack.com/services/" + webhook
            channel = "#sensu"
            begin
            payload = {
                :channel  => channel,
                :text     => message,
            }.to_json
              cmd = "curl -X POST --data-urlencode 'payload=#{payload}' #{webhookUrl}"
              system(cmd)
            rescue
                    puts "failed to notify slack, proceeding..."
            end
      end
def writeToSlack ( message , err = false ) webhook = "T02B3AJ9B/BAYDG2VHN/jOVR3fy8AG5O7Y4ftTfNzon7" webhookUrl = "https://hooks.slack.com/services/" + webhook channel = "#sensu" begin payload = { :channel => channel , :text => message , } . to_json cmd = "curl -X POST --data-urlencode 'payload=#{payload}' #{webhookUrl}" system ( cmd ) rescue puts "failed to notify slack, proceeding..." end end
Will post Slack message to channel sensu
Will post Slack message to channel sensu
message
<not_specific>
err
<not_specific>