This file contains hidden or 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
var date = new Date(); | |
var daysToDeletion = 120; | |
var deletionDate = new Date(date.setDate(date.getDate() - daysToDeletion)); | |
printjson(deletionDate); | |
var db = db.getSiblingDB('alignak-backend') | |
db.getMongo().setSlaveOk(); | |
// logcheckresult and/or history are candidates to deletion |
This file contains hidden or 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
from github3 import login | |
from pprint import pprint | |
import operator | |
user, password = 'mohierf', 'my_password' | |
commits_count = 0 | |
g = login(user, password=password) | |
organization = 'alignak-monitoring' |
This file contains hidden or 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
**Service definition duplicate_foreach** | |
This is used to generate serveral service with only one service declaration. | |
Alignak understands this statement as : “Create a service for each key in the variable”. | |
Usually, this statement come with a “$KEY$” string in the service_description (to have a different name) and | |
in the check_command (you also want a different check). | |
Moreover, one or several variables can be associated to each key. | |
Then, values can be used in the service definition with $VALUE$ or $VALUEn$ macros. |
This file contains hidden or 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
# If you wish to know if the currently Alignak installed packages are up-to-date, you can use this command: | |
pip list --outdated | grep alignak | |
# To get the list of outdated packages as a pip requirements list: | |
pip list --outdated --format columns | grep alignak | awk '{printf "%s==%s\n", $1, $3}' > alignak-update.txt | |
# And then update your installed packages | |
pip install -r alignak-update.txt |