Skip to content

Instantly share code, notes, and snippets.

@FilBot3
Last active June 3, 2016 21:55
Show Gist options
  • Select an option

  • Save FilBot3/7c5bc540c22fa7317ef7569ea908fd39 to your computer and use it in GitHub Desktop.

Select an option

Save FilBot3/7c5bc540c22fa7317ef7569ea908fd39 to your computer and use it in GitHub Desktop.
cem_sender cli errors
C:\Users\PD028300\Desktop\cem_sender (master)
λ bundle exec ruby exe\cem_sender send "http://10.160.5.117/NextGenEMWeb/json/*/sendevent" "Farts and stuff" "{\"type\":\"ns0:ListOfEventAttributes\",\"EventAttribute\":[{\"attrname\":\"cer_impacted_asset\",\"attrvalue\":\"cesservername00.northamerica.cerner.net\"},{\"attrname\":\"mc_object\",\"attrvalue\":\"Test-Param-Instance\"},{\"attrname\":\"mc_parameter\",\"attrvalue\":\"TEST-PARAM\"},{\"attrname\":\"mc_parameter_value\",\"attrvalue\":\"5\"},{\"attrname\":\"severity\",\"attrvalue\":\"Average\"},{\"attrname\":\"cer_contact\",\"attrvalue\":\"csmzabbix\"},{\"attrname\":\"message\",\"attrvalue\":\"The JVM is being checked once a minute, and if the CPU is at 200% five times, then this trigger fires. \\\\nThe JVM is using a lot of CPU power, and could possibly be starving the server. \\\\n\\\\nView this screen for historical trends. \\\\n\\\\nhttp://corporatezabbix/zabbix/screens.php?ddreset=1\\&sid=448fd0a5c0d94068\\\\n\\\\nCEM_PARAM[TEST-PARAM]\"},{\"attrname\":\"cer_SOP\",\"attrvalue\":\"https://www.cerner.com\"},{\"attrname\":\"status\",\"attrvalue\":\"ALARM\"}]}" --verbosity=DEBUG
Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.
Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/json-1.8.3/lib/json/common.rb:155:in `parse': 399: unexpected token at '{"attrname":"message","attrvalue":"The JVM is being checked once a minute, and if the CPU is at 200% five times, then this trigger fires. \\\\nThe JVM is using a lot of CPU power, and could possibly be starving the server. \\\\n\\\\nView this screen for historical trends. \\\\n\\\\nhttp://corporatezabbix/zabbix/screens.php?ddreset=1\' (JSON::ParserError)
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/json-1.8.3/lib/json/common.rb:155:in `parse'
from C:/Users/PD028300/Desktop/cem_sender/lib/cem_sender.rb:36:in `initialize'
from C:/Users/PD028300/Desktop/cem_sender/lib/cem_sender/cli.rb:9:in `new'
from C:/Users/PD028300/Desktop/cem_sender/lib/cem_sender/cli.rb:9:in `send'
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from exe/cem_sender:8:in `<main>'
'sid' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\PD028300\Desktop\cem_sender (master)
λ bundle exec ruby exe\cem_sender send "http://10.160.5.117/NextGenEMWeb/json/*/sendevent" "Farts and stuff" '{"type":"ns0:ListOfEventAttributes","EventAttribute":[{"attrname":"cer_impacted_asset","attrvalue":"cesservername00.northamerica.cerner.net"},{"attrname":"mc_object","attrvalue":"Test-Param-Instance"},{"attrname":"mc_parameter","attrvalue":"TEST-PARAM"},{"attrname":"mc_parameter_value","attrvalue":"5"},{"attrname":"severity","attrvalue":"Average"},{"attrname":"cer_contact","attrvalue":"csmzabbix"},{"attrname":"message","attrvalue":"The JVM is being checked once a minute, and if the CPU is at 200% five times, then this trigger fires. \\\\nThe JVM is using a lot of CPU power, and could possibly be starving the server. \\\\n\\\\nView this screen for historical trends. \\\\n\\\\nhttp://corporatezabbix/zabbix/screens.php?ddreset=1\\&sid=448fd0a5c0d94068\\\\n\\\\nCEM_PARAM[TEST-PARAM]"},{"attrname":"cer_SOP","attrvalue":"https://www.cerner.com"},{"attrname":"status","attrvalue":"ALARM"}]}' --verbosity=DEBUG
Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.
Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
D, [2016-06-03T16:41:01.425733 #1212] DEBUG -- : initialize: The destination: http://10.160.5.117/NextGenEMWeb/json/*/sendevent
D, [2016-06-03T16:41:01.425733 #1212] DEBUG -- : initialize: The Subject Line: Farts and stuff
D, [2016-06-03T16:41:01.426733 #1212] DEBUG -- : initialize: The Message Body: {"type":"ns0:ListOfEventAttributes","EventAttribute":[{"attrname":"cer_impacted_asset","attrvalue":"cesservername00.northamerica.cerner.net"},{"attrname":"mc_object","attrvalue":"Test-Param-Instance"},{"attrname":"mc_parameter","attrvalue":"TEST-PARAM"},{"attrname":"mc_parameter_value","attrvalue":"5"},{"attrname":"severity","attrvalue":"Average"},{"attrname":"cer_contact","attrvalue":"csmzabbix"},{"attrname":"message","attrvalue":"The JVM is being checked once a minute, and if the CPU is at 200% five times, then this trigger fires. \\\\nThe JVM is using a lot of CPU power, and could possibly be starving the server. \\\\n\\\\nView this screen for historical trends. \\\\n\\\\nhttp://corporatezabbix/zabbix/screens.php?ddreset=1\\&sid=448fd0a5c0d94068\\\\n\\\\nCEM_PARAM[TEST-PARAM]"},{"attrname":"cer_SOP","attrvalue":"https://www.cerner.com"},{"attrname":"status","attrvalue":"ALARM"}]}
D, [2016-06-03T16:41:01.426733 #1212] DEBUG -- : initialize: Loading the CEM Sender Config File.
D, [2016-06-03T16:41:01.426733 #1212] DEBUG -- : post_to_cem: Building the REST Client
D, [2016-06-03T16:41:01.426733 #1212] DEBUG -- : post_do_cem: POST'ing the message.
D, [2016-06-03T16:41:01.427733 #1212] DEBUG -- : build_message: Extracting the parameter from:
C:/Users/PD028300/Desktop/cem_sender/lib/cem_sender.rb:141:in `build_message': undefined method `[]' for nil:NilClass (NoMethodError)
from C:/Users/PD028300/Desktop/cem_sender/lib/cem_sender.rb:175:in `post_to_cem'
from C:/Users/PD028300/Desktop/cem_sender/lib/cem_sender/cli.rb:10:in `send'
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from exe/cem_sender:8:in `<main>'
bundle exec ruby exe\cem_sender send "http://10.160.5.117/NextGenEMWeb/json/*/sendevent" "Farts and stuff" "{\"type\":\"ns0:ListOfEventAttributes\",\"EventAttribute\":[{\"attrname\":\"cer_impacted_asset\",\"attrvalue\":\"cesservername00.northamerica.cerner.net\"},{\"attrname\":\"mc_object\",\"attrvalue\":\"Test-Param-Instance\"},{\"attrname\":\"mc_parameter\",\"attrvalue\":\"TEST-PARAM\"},{\"attrname\":\"mc_parameter_value\",\"attrvalue\":\"5\"},{\"attrname\":\"severity\",\"attrvalue\":\"Average\"},{\"attrname\":\"cer_contact\",\"attrvalue\":\"csmzabbix\"},{\"attrname\":\"message\",\"attrvalue\":\"The JVM is being checked once a minute, and if the CPU is at 200% five times, then this trigger fires. \\\\nThe JVM is using a lot of CPU power, and could possibly be starving the server. \\\\n\\\\nView this screen for historical trends. \\\\n\\\\nhttp://corporatezabbix/zabbix/screens.php?ddreset=1\\&sid=448fd0a5c0d94068\\\\n\\\\nCEM_PARAM[TEST-PARAM]\"},{\"attrname\":\"cer_SOP\",\"attrvalue\":\"https://www.cerner.com\"},{\"attrname\":\"status\",\"attrvalue\":\"ALARM\"}]}" --verbosity=DEBUG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment