This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config.py | |
CONFIG = { | |
"url": ["https://docs.rundeck.com"], # Assuming list format to potentially handle multiple starting URLs | |
"match": "https://docs.rundeck.com", | |
"selector": "*", | |
"maxPagesToCrawl": 1000, | |
"outputFileName": "output.json" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import re | |
import time | |
base_url = "https://YOURURL" | |
headers = { | |
'X-Rundeck-Auth-token': 'ADDTOKEN', | |
'Content-Type': 'application/json', | |
'accept': 'application/json', | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import json | |
import time | |
from pycololight import PyCololight | |
from pdpyras import APISession | |
# Initialize API session | |
api_key = "ENTERKEY" | |
session = APISession(api_key) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG RUNNER_VERSION=latest | |
FROM rundeckpro/runner:${RUNNER_VERSION} | |
USER root | |
RUN apt-get update && \ | |
apt-get upgrade -y && \ | |
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
curl \ | |
python3-pip && \ | |
pip3 install --upgrade pip && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
</head> | |
<body> | |
<div class="jumbotron"> | |
<h1 class="display-4">PagerDuty Events 🔥</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PagerDuty Automation Runner 2023 | |
FROM openjdk:11-jre-slim | |
WORKDIR / | |
COPY runner.jar runner.jar | |
# Add Tini for initialisation | |
ENV TINI_VERSION v0.19.0 | |
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global class PDprocessautomation implements Process.Plugin { | |
global Process.PluginResult invoke(Process.PluginRequest request) { | |
//Add Payload Parameters - 4 payload paramters in this case; Modify for more | |
String item1 = (String) request.inputParameters.get('item1'); | |
String item2 = (String) request.inputParameters.get('item2'); | |
String item3 = (String) request.inputParameters.get('item3'); | |
String item4 = (String) request.inputParameters.get('item4'); | |
//Request | |
Http h = new Http(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Modified for Process Automation, Python 3.x , Justyn Roberts 2022 | |
# Based on original code from AppliedTrust / Ryan Hartkopf in 2014 | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
</head> |