You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
804 B
36 lines
804 B
import Action from './../../packages/server/actions/action.js'
|
|
import XmppHelper from './../helpers/Xmpp.js'
|
|
|
|
/**
|
|
* Getting Http State
|
|
*
|
|
* @author Björn Hase <me@herr-hase.wtf>
|
|
* @license http://opensource.org/licenses/MIT The MIT License
|
|
* @link https://git.node001.net/HerrHase/super-hog.git
|
|
*
|
|
*/
|
|
|
|
class Pingdom extends Action {
|
|
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
async run() {
|
|
|
|
const xmppHelper = new XmppHelper(
|
|
process.env.XMPP_SERVICE,
|
|
process.env.XMPP_DOMAIN,
|
|
process.env.XMPP_USERNAME,
|
|
process.env.XMPP_PASSWORD
|
|
)
|
|
|
|
const message = this.data.check_params.full_url + ' / ' + this.data.current_state
|
|
await xmppHelper.sendToRoom(this.flow, process.env.XMPP_ROOM, message)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export default Pingdom
|