Migration Guide to Go Based Lamp

OpsGenie Lamp command line utility first implemented with Java and now it's migrating to Golang. Some modifications will be required to make sure your lamp commands are working.

Also some new features added to brand new Go based Lamp.

You can find more information about new Go Based Lamp from here.
You can also find deprecated Jave Based Lamp document from here.
What's new in Go Based Lamp?
  • You can execute commands in verbose mode to get detailed information about the execution. All you should do to add a '-v' parameter to your commands.
    lamp createAlert --message "appserver1 down" -v
  • New Lamp let's you use a config file located in a custom location, with --config file parameter.
    lamp createAlert --message "host down" --config "/opt/conf/myConfigurationFile.conf"
  • OpsGenie Lamp is used to distributed with Marid in opsgenie-integration package.
    And they were using a common config <LAMP_HOME>/../conf/opsgenie-integration.conf file .
    Now, they are distributing in separate packages. Stand-alone Lamp package contains a config file in <LAMP_HOME>/conf/lamp.conf.
  • Java based Lamp used to handle log configuration in a separate file in log.properties file. Now this configuration file is removed and log configurations moved to <LAMP_HOME>/conf/lamp.conf and changed like the following properties:
    lamp.log.level=info
    lamp.log.file=lamp.log
    
    If you do not make log configurations, it will write logs to <LAMP_HOME>/logs/lamp.log
What should Java Based Lamp users do to keep their lamp commands working?
  • Parameter values with spaces were allowed by Java based lamp. In Go based lamp, you should use quotation marks(") to give spaced values to your parameters. Comma separated list parameters should also be wrapped with quotation marks. Check out the example below:
    Java based Lamp command
    lamp createAlert --message appserver1 down --description detailed information about the alert --tags operations, servers --actions ping, stop, restart
    Go based Lamp command
    lamp createAlert --message "appserver1 down" --description "detailed information about the alert" --tags "operations, servers" --actions "ping, stop, restart"
  • Additional alert property parameter "-D" should contain a space between parameter and value like the following
    Java based Lamp Command
    lamp createAlert --message appserver1 down -Dseverity=critical
    Go based Lamp Command
    lamp createAlert --message "appserver1 down" -D severity=critical
Go Based Lamp does not support "executeScript" command. You can accomplish script execution by using Marid. To get more information about Marid and script execution feature, refer to Marid Integration support doc.