package
stringlengths 1
122
| pacakge-description
stringlengths 0
1.3M
|
---|---|
aliceplex-schema
|
aliceplex-schemaaliceplex-schema is a schema library for Plex. It provides basic Plex related model.
This can be used to develop other Plex library.Installpipinstallaliceplex-schema
|
aliceplex-scrap
|
aliceplex-scrapaliceplex-scrap is a scrapper library for Plex.Installpipinstallaliceplex-scrap
|
aliceplex-serialize
|
aliceplex-serializealiceplex-serialize is serialization library for Plex.Installpipinstallaliceplex-serialize
|
alice-scripts
|
alice_scripts=============Простой способ создавать сложные сценарии для [Яндекс.Алисы](https://dialogs.yandex.ru/)> Библиотека разработана сообществом и не является продуктом Яндекса## 🚀 Быстрый стартЭта библиотека позволяет писать многоэтапные сценарии без callback-ов и ручного хранения информации о состоянии диалога. Достаточно использовать условия и циклы:> ```> from alice_scripts import Skill, request, say, suggest> skill = Skill(__name__)> ``````[email protected] run_script():yield say('Добрый день! Как вас зовут?')name = request.commandyield say('Сколько вам лет?')while not request.matches(r'\d+'):yield say('Я вас не поняла. Скажите число')age = int(request.command)yield say('Вы любите кошек или собак?',suggest('Обожаю кошечек', 'Люблю собак'))while not request.has_lemmas('кошка', 'кошечка','собака', 'собачка'):yield say('У вас только два варианта - кошки или собаки')loves_cats = request.has_lemmas('кошка', 'кошечка')yield say(f'Рада познакомиться, {name}! Когда вам 'f'исполнится {age + 1}, я могу подарить 'f'{"котёнка" if loves_cats else "щенка"}!',end_session=True)```Запустить сценарий можно как обычное [Flask](http://flask.pocoo.org/)-приложение:pip install alice_scriptsFLASK_APP=hello.py flask run --with-threads## Примеры* [Примеры из документации](examples)* [Навык «Приложение для знакомств»](https://github.com/FuryThrue/WhoIsAlice/blob/master/app.py)## 📖 Интерфейс### SkillКласс `Skill` реализует WSGI-приложение и является наследником класса [flask.Flask](http://flask.pocoo.org/docs/1.0/api/#flask.Flask). Сценарий, соответствующий приложению, регистрируется с помощью декоратора `@skill.script` (см. пример выше).Сценарий запускается отдельно для каждого уникального значения `session_id`.### yield say(...)Конструкция `yield say(...)` служит для выдачи ответа на запрос и принимает три типа параметров:- Неименованные строковые аргументы задают варианты фразы, которую нужно показать и сказать пользователю. При выполнении случайно выбирается один из вариантов:```pythonyield say('Как дела?', 'Как вы?', 'Как поживаете?')```- Модификаторы (см. ниже) позволяют указать дополнительные свойства ответа. Например, модификатор `suggest` создаёт кнопки с подсказками для ответа:```pythonyield say('Как дела?', suggest('Хорошо', 'Нормально', 'Не очень'))```- Именованные аргументы позволяют использовать те возможности [протокола](https://tech.yandex.ru/dialogs/alice/doc/protocol-docpage/#response), для которых нет модификаторов:```pythonyield say('Здравствуйте! Это мы, хороводоведы.',tts='Здравствуйте! Это мы, хоров+одо в+еды.')```Переданные пары «ключ-значение» будут записаны в словарь `response` в ответе навыка.### МодификаторыМодификаторы — это функции, возвращающие [замыкания](https://ru.wikipedia.org/wiki/%D0%97%D0%B0%D0%BC%D1%8B%D0%BA%D0%B0%D0%BD%D0%B8%D0%B5_(%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5)). При этом каждое замыкание должно принимать словарь `response` из [ответа](https://tech.yandex.ru/dialogs/alice/doc/protocol-docpage/#response) навыка и добавлять туда нужные ключи.- `suggest(...)`Создаёт кнопки с подсказками для ответа:```pythonyield say('Как дела?', suggest('Хорошо', 'Нормально'))```> Так как библиотека находится в стадии proof of concept, других модификаторов пока не реализовано. Используйте именованные параметры в конструкции `yield say(...)`.### requestОбъект `request` представляет собой thread-local хранилище, содержащее информацию о последнем действии пользователя в сессии.- С объектом `request` можно работать как со словарём, полученным из [запроса](https://tech.yandex.ru/dialogs/alice/doc/protocol-docpage/#request) к навыку:```pythonoriginal_utterance = request['request']['original_utterance']```- `request.command` — свойство, содержащее значение поля [command](https://tech.yandex.ru/dialogs/alice/doc/protocol-docpage/#request), из которого убраны завершающие точки.- `request.matches(pattern, flags=0)` — метод, позволяющий проверить, удовлетворяет ли свойство `request.command` регулярному выражению `pattern` (используется функция [re.fullmatch](https://docs.python.org/3/library/re.html#re.fullmatch)).- `request.words` — свойство, содержащее все слова (и числа), найденные в поле [command](https://tech.yandex.ru/dialogs/alice/doc/protocol-docpage/#request).- `request.lemmas` — свойство, содержащее начальные формы слов из свойства `request.words` (полученные с помощью библиотеки [pymorphy2](http://pymorphy2.readthedocs.io/en/latest/)).- `request.has_lemmas(...)` — метод, позволяющий проверить, были ли в запросе слова, чьи начальные формы совпадают с начальными формами указанных слов:```pythonif request.has_lemmas('нет', 'не'):answer = 'no'elif request.has_lemmas('да', 'ага'):answer = 'yes'```## Разбиение на подпрограммыСценарий можно (и нужно) разбивать на подпрограммы. Каждая подпрограмма *должна* вызываться с помощью оператора `yield from` и может возвращать значение с помощью оператора `return`. См. [пример](examples/guess_number_subgens.py).## РазвёртываниеВ этой библиотеке состояние диалога хранится в виде состояния Python-генератора и не может быть сериализовано. В связи с этим:- Реплики из одной сессии всегда должны обрабатываться одним и тем же процессом.- Навык не может быть запущен на serverless-платформе.- При перезапуске приложения все сессии будут разорваны.Развернуть приложение в production-е можно с помощью gunicorn. Вы можете использовать несколько [потоков](http://docs.gunicorn.org/en/stable/settings.html#threads), но не можете использовать несколько [воркеров](http://docs.gunicorn.org/en/stable/settings.html#workers) (иначе gunicorn будет направлять реплики из одной сессии разным процессам).## МасштабированиеЕсли у вашего навыка много пользователей и одного процесса недостаточно, чтобы успевать отвечать на запросы за требуемое время (по протоколу — не более 1,5 сек), можно поступить так:1. Запустите несколько экземпляров gunicorn (в каждом — 1 воркер) на одном или нескольких серверах.2. Настройте nginx таким образом, чтобы он направлял запросы с одним и тем же `session_id` к одному и тому же экземпляру gunicorn.Пример описанной конфигурации есть в [этой папке](examples/scaling).## АвторCopyright © Александр Борзунов, 2018The MIT License (MIT)
|
alice-skills-manager
|
No description available on PyPI.
|
alice-skills-maneger
|
No description available on PyPI.
|
alice-tool
|
No description available on PyPI.
|
alicetools
|
MOTA
|
alice-types
|
AliceTypesБиблиотека моделей Pydantic-V2 для валидации протокола Я.ДиалоговУстановка:pipinstallalice-typesИспользованиеПример с FastApifromalice_types.responseimportAliceResponsefromalice_types.requestimportAliceRequestfromfastapiimportFastAPIapp=FastAPI()@app.post(path="/")asyncdefhandler(alice_request:AliceRequest):reply=AliceResponse()ifalice_request.is_new_session():reply.response.text="Привет, скажи что-нибудь и я это повторю"returnreplyreply.response.text=alice_request.request.original_utterancereturnreplyПример с AIOHttpfromalice_types.responseimportAliceResponsefromalice_types.requestimportAliceRequestfromaiohttpimportwebasyncdefhandler(request):body=awaitrequest.json()alice_request=AliceRequest.model_validate(body)reply=AliceResponse()ifalice_request.is_new_session():reply.response.text="Привет, скажи что-нибудь и я это повторю"else:reply.response.text=alice_request.request.original_utterancebody=reply.model_dump()returnweb.json_response(body)app=web.Application()app.router.add_post('/',handler)if__name__=="__main__":web.run_app(app)Расширение типов полейВ библиотеке имеются модели с динамически расширяемыми полями:request.StateState.extend_session_model(model: BaseModel)State.extend_user_model(model: BaseModel)State.extend_application_model(model: BaseModel)request.RequestPurchase.payloadRequestPurchase.extend_payload_model(model: BaseModel)Ограничение размера хранилищ для модели ответаВ модели AliceResponse по умолчанию установлен стандартный размер хранилищ (1 КБ), который можно изменить при
необходимости:fromalice_types.responseimportAliceResponseAliceResponse.set_session_state_limit_size(1024*8)AliceResponse.set_user_state_limit_size(1024*16)AliceResponse.set_application_state_limit_size(1024*32)Публичные методыAliceRequestAliceRequest.is_ping()AliceRequest.is_new_session()AliceRequest.authorization_is_completed()fromalice_types.responseimportAliceResponse,Responsefromalice_types.requestimportAliceRequestasyncdefhandler(alice_request:AliceRequest):ifalice_request.is_ping():returnAliceResponse(response=Response(text="pong"))elifalice_request.is_new_session():returnAliceResponse(response=Response(text="Привет, скажи что-нибудь и я это повторю"))elifalice_request.authorization_is_completed():returnAliceResponse(response=Response(text="Ты авторизован это хорошо 👍"))...AliceRequest.request.nlu.entitiesentities.get(entity_type: SlotsType | str) -Возвращает список сущностей заданного типа.entity.available() -Возвращает список доступных атрибутов объекта, у которых значение не равно None. Метод доступен у всех сущностей.EntityDatetime.to_datetime(timezone: pytz.BaseTzInfo | str | None = None)fromtypingimportListfromalice_types.requestimportAliceRequest,SlotsType,EntityFio,EntityDatetimeasyncdefhandler(alice_request:AliceRequest):fio_entities:List[EntityFio]=alice_request.request.nlu.entities.get(SlotsType.YANDEX_FIO)names=[]forentityinfio_entities:if"first_name"inentity.value.available():names.append(entity.value.first_name)dates=[]datetime_entities:List[EntityDatetime]=alice_request.request.nlu.entities.get(SlotsType.YANDEX_DATETIME)forentityindatetime_entities:dates.append(entity.to_datetime(timezone=alice_request.meta.timezone# Default: None))...AliceRequest.request.meta.interfacesinterfaces.has(interface: Union[InterfaceType, str]) -Проверяет, существует ли этот интерфейс.interfaces.available() -Возвращает список доступных интерфейсов.fromalice_types.requestimportAliceRequest,InterfaceTypeasyncdefhandler(alice_request:AliceRequest):ifalice_request.meta.interfaces.has(InterfaceType.SCREEN):passПримерыEchoBotАвторизацияРасширение типов полей:request.Staterequest.RequestPurchase.payload
|
aliceum
|
No description available on PyPI.
|
alicia
|
AlicIAUsage: alicia [OPTIONS] COMMAND [ARGS]...
A CLI to download, create, modify, train, test, predict and compare an image classifiers.
Supporting mostly all torch-vision neural networks and datasets.
This will also identify cute 🐱 or a fierce 🐶, also flowers or what type of
🏘️ you should be.
Options:
-v, --verbose
-g, --gpu
--version Show the version and exit.
--help Show this message and exit.
Commands:
compare Compare the info, accuracy, and step speed two (or more by...
create Creates a new model for a given architecture.
download Download a MNIST dataset with PyTorch and split it into...
info Display information about a model architecture.
modify Changes the hyper parameters of a model.
predict Predict images using a pre trained model, for a given folder...
test Test a pre trained model.
train Train a given architecture with a data directory containing a...View a FashionMNIST demoInstall and usagepip install alicia
alicia --helpIf you just want to see a quick showcase of the tool, download and runshowcase.shhttps://github.com/aemonge/alicia/raw/main/docs/showcase.shFeaturesTo see the full list of features, and option please refer toalicia –helpDownload common torchvision datasets (tested with the following):MNISTFashionMNISTFlowers102EMNISTStanfordCarsKMNIST and CIFAR10Select different transforms to train.Train, test and predict using different custom-made and torch-vision models:SqueezeNetAlexNetMNASNetGet information about each model.Compare models training speed, accuracy, and meta information.View test prediction results in the console, or with matplotlib.Adds the network training history log, to the model. To enhance the info and compare.Supports pre-trained models, with weights settings.Automatically set the input size based on the image resolution.ReferencesUseful links found and used while developing thishttps://medium.com/analytics-vidhya/creating-a-custom-dataset-and-dataloader-in-pytorch-76f210a1df5dhttps://stackoverflow.com/questions/51911749/what-is-the-difference-between-torch-tensor-and-torch-tensorhttps://deepai.org/dataset/mnisthttps://medium.com/fenwicks/tutorial-1-mnist-the-hello-world-of-deep-learning-abd252c47709
|
ali-cli
|
Ali CLIWraps the Alibaba Cloud SDK to make complicated tasks a lot simpler.InstallationInstallation is easy, run the following command to install the CLI through Pip:pipinstallali-cliThen run the CLI using the commandali. You should see the default help output with the supported commands.ConfigurationTo connect the CLI to your Alibaba Cloud account, you will either need to use the officialAliyun CLIto
configure your credentials or create the configuration manually. To use the CLI, runaliyun configureand follow the prompts. If you don't want
to install the official CLI, you can manually create the file~/.aliyun/config.jsonwith the following contents:{"current":"","profiles":[{"name":"","mode":"AK","access_key_id":"ACCESS_KEY_ID","access_key_secret":"ACCESS_KEY_SECRET","sts_token":"","ram_role_name":"","ram_role_arn":"","ram_session_name":"","private_key":"","key_pair_name":"","expired_seconds":0,"verified":"","region_id":"eu-central-1","output_format":"json","language":"zh","site":"","retry_timeout":0,"retry_count":0}]}ReplaceACCESS_KEY_IDwith your access key ID andACCESS_KEY_SECRETwith your access key secret. Optionally, you can change the region to the region you like (eu-central-1is Frankfurt).Supported servicesKey Management Service (KMS)-documentationMessage Notification Service (MNS)-documentationResource Orchestration Service (ROS)-documentationSupported workflowsClient-side cryptography with Object Storage Service (OSS)-documentationKey Management Service (KMS)Supports listing of Customer Master Keys (CMK), encryption and decryption with and without data key.To see a list of supported commands, useali kms.Message Notification Service (MNS)As the official Alibaba Cloud CLI has no support for Message Notification Service, we decided that it would be nice to have support for it in Ali CLI. We currently
support the following operations on queues and messages.Queue operationsCreating a queue -ali mns queue create --name NAMEListing queues -ali mns queue listGetting queue attributes -ali mns queue get --name NAMEDeleting a queue -ali mns queue delete --name NAMEMessage operationsSending a message -echo '{"success": true}' | ali mns queue send-message --name NAME --message-body -Receiving a single message -ali mns queue receive-message --name NAMEReceiving a batch of messages -ali mns queue receive-messages --name NAME --num-of-messages 10Peeking at a message -ali mns queue peek-message --name NAMEPeeking at a batch of messages -ali mns queue peek-messages --name NAME --num-of-messages 10Deleting a message from a queue -ali mns queue delete-message --name NAME --handle RECEIPT_HANDLETopics and subscriptions will be supported at a later point in time.Resource Orchestration Service (ROS)Ali CLI supports most of the ROS functions. This allows you to deploy JSON templates as stacks,
so you can use code to define your whole infrastructure.To deploy an example bucket, run the following command:aliroscreate-stack--nameali-ros-test--templateexamples/ros/bucket.json--parametersBucketName=my-fancy-bucketThis will create the stackali-ros-test, using the template in theexamples/ros/bucket.jsonfile and specifies the values to use for the
template parameters. You can specify multiple parameters if necessary by repeating the--parameters <key>=<val>option as many times as you need.
Feel free to modify the stack name and templates if you like. You can also specify-for the template, which means that it
will be read from stdin. Type or paste the template in the prompt and press Ctrl-D to send it into the CLI.To list stacks, runali ros describe-stacks. This will output all the stacks in the current region.To delete a stack, runali ros delete-stack --name ali-ros-test. This will remove the stack you created above, including the provisioned resources.Although the Alibaba ROS API's only support JSON templates, Ali CLI can also deploy YAML templates. We do this by converting your YAML into JSON
before creating the stack. Examples of both JSON and YAML templates can be found in theexamples/rosdirectory.Client-side cryptography with Object Storage Service (OSS)When you store your data in the cloud, it sometimes feels a bit weird to use services like Key Management Service (KMS). With KMS, the keys that are used
for encryption are generated by the cloud provider, and you have to trust them to not misuse the keys and decrypt your data. If you cannot or do not want
to trust your provider, client-side encryption can be a solution for your most valuable data. Ali CLI has some basic features for automating client-side
encryption, so you don't have to do it yourself. The following features are supported:Prequisite: Generating a keyTo encrypt or decrypt data, we first need a key:ali crypto generate-key -k KEYFILEThe generated secret key will be put in theKEYFILEpath. This file is extremely important and should be kept somewhere safe. If the key file is lost,
you will lose access to all the data that has been encrypted with the key. There is no way to resolve this.The encryption mechanism uses aFernet symmetric keyfor encryption and decryption. The key's contents are
written toKEYFILEdirectly. This means that anyone with access to that file is also able to decrypt your data. Be careful with handing out the keyfile
to others. Keep a copy of the key offline in a safe (on a USB stick or write the key out on paper) and remove the key from your computer as soon as you
are done with it. For convenience, you could decide to store a copy of the key online. I would suggest you to store the key separated from the data,
preferrably in the online storage solution of a different cloud provider. Be sure to enable encryption on the bucket.Encrypting / decrypting locallyThe keyfile can be used to encrypt / decrypt strings and files locally. Here are a few examples:alicryptoencrypt-kKEYFILE-sPLAIN_TEXT# Encrypt stringalicryptodecrypt-kKEYFILE-sENCRYPTED_STRING# Decrypt stringalicryptoencrypt-kKEYFILE-fFILE_TO_ENCRYPT# Encrypt file at pathalicryptodecrypt-kKEYFILE-fFILE_TO_DECRYPT# Decrypt file at pathAs an example, let's say you want to encrypt your very secure passwordMyPassword1234. To do this, follow these steps:[leon@home~]alicryptogenerate-key-kmy-key
>Successfullycreatedsecretkeyinmy-key[leon@home~]alicryptoencrypt-kmy-key-sMyPassword1234
>gAAAAABdhyODhPOc9UdcRQ1lTXOTZC2q-bsuhcQqhfoG4Jf...# trimmed for readability[leon@home~]alicryptodecrypt-kmy-key-sgAAAAABdhyODhPOc9UdcRQ1lTXOTZC2q-bsuhcQqhfoG4Jf...
>MyPassword1234File encryption only supports files, not directories.Automatic upload / download of encrypted files to OSSTo solve the problems outlined in the introduction of this workflow, it can be very handy to employ client-side encryption when uploading sensitive
files to a cloud provider's storage solution. Using Ali CLI, you can conveniently upload files and directories to a bucket, automatically encrypting
them with a keyfile on your computer. When you download them again, the files will be downloaded and decrypted locally again. Only encrypted data
will be transferred over the wire and stored in the OSS bucket.The CLI commands are very simple and largely mirror the commands of the official CLI:# Copy from local directory / file to bucketalicryptoosscpLOCAL_PATHoss://BUCKET/PATH-kKEYFILE# Copy from bucket to local file / directoryalicryptoosscposs://BUCKET/PATHLOCAL_PATH-kKEYFILEAs the files are encrypted and decrypted locally, the keyfile is very important. If you lose it, the online data also becomes useless.
|
alicloudcli
|
#AliCloud Command Line InterfaceThe AliCloud Command Line Interface is a unified tool to manage your AliCloud services. With just one tool to download and configure, you can control multiple AliCloud services from the command line and automate them through scripts.If you got any problems, please send mail to us:[email protected]###Prerequisites:* Windows, Linux, OS X, or Unix* Python 2 version 2.6.X or version 2.7.x not support python 3.x* Pip###Install the Alicloud CLI using pip:$ sudo pip install alicloudcliTo upgrade an existing Alicloud CLI installation, use the --upgrade option::$ sudo pip install --upgrade alicloudcliFor windows system, you please dont use sudo.###Command Completion:On Linux and Mac OS systems, the AliCloud CLI includes a command-completion feature that can enable you to use the TAB key to complete a partially typed command. This feature needs you configure it manually.Configuring command completion requires two pieces of information: the name of the shell you are using and the location of the alicloud_completer script.####bash:$ complete -C '/usr/local/bin/alicloud_completer' alicloud####zsh:% source /usr/local/bin/alicloud_zsh_complete.sh###Configure the AliCloud CLI:Run alicloud configure at the command line to set up your credentials and settings.$ alicloud configureAlicloud Access Key ID [****************wQ7v]:Alicloud Access Key Secret [****************fxGu]:Default Region Id [cn-hangzhou]:Default output format [json]:After configure you can use the tool now:$ alicloud Ecs DescribeInstances$ alicloud Ecs StartInstance --InstanceId your_instance_id$ alicloud Rds DescribeDBInstances###Install the SDK using pipAliCloud CLI needs SDK to work , you can install SDK using pip like follow:$sudo pip install aliyun-python-sdk-ecs$sudo pip install aliyun-python-sdk-rds$sudo pip install aliyun-python-sdk-slbMore detail you can access our official website:http://intl.alicloud.com
|
alicloud-exporter
|
Prometheus Exporter for Alibaba CloudQuick Start原作者GitHub地址代码修改:添加自定义标签根据标签push到~/metrics添加日志打印修复自定义标签自动匹配dict.key配置文件重定义,增加【global_config;metrics-team,game_name-cluster】InstallationPython 3.5+ is required.pip3installalicloud-exporterUsageConfig your credential and interested metrics:credential:access_key_id:<YOUR_ACCESS_KEY_ID>access_key_secret:<YOUR_ACCESS_KEY_SECRET>region_id:<REGION_ID>metrics:acs_cdn:-name:QPSteam:'team-name'acs_mongodb:-name:CPUUtilizationperiod:300measure:Maximumgame_name:dev:-id_qazqweasd:二_哈output-example:
aliyun_acs_ecs_dashboard_DiskWriteIOPS{altype="wx",app="yyds",cluster="dev",instanceId="i-a***d",name="web",region="CN",team="abc123***"} 66.6Run the exporter:>aliyun-exporter-p9525-caliyun-exporter.ymlThe default port is 9525, default config file location is./aliyun-exporter.yml.Visit metrics inlocalhost:9525/metricsConfigurationrate_limit:5# request rate limit per second. default: 10credential:access_key_id:<YOUR_ACCESS_KEY_ID># requiredaccess_key_secret:<YOUR_ACCESS_KEY_SECRET># requiredregion_id:<REGION_ID># default: 'cn-hangzhou'metrics:# required, metrics specificationsacs_cdn:# required, Project Name of CloudMonitor-name:QPS# required, Metric Name of CloudMonitor, belongs to a certain Projectrename:qps# rename the related prometheus metric. default: same as the 'name'period:60# query period. default: 60measure:Average# measure field in the response. default: Averageinfo_metrics:-ecs-rds-redisNotes:Find your target metrics usingMetrics MetaCloudMonitor API has an rate limit, tuning therate_limitconfiguration if the requests are rejected.CloudMonitor API also has an monthly quota for invocations (AFAIK, 5,000,000 invocations / month for free). Plan your usage in advance.Given that you have 50 metrics to scrape with 60s scrape interval, about 2,160,000 requests will be sent by the exporter for 30 days.Special ProjectSome metrics are not included in the Cloud Monitor API. For these metrics, we keep the configuration abstraction consistent by defining special projects.Special Projects:rds_performance: RDS performance metrics, available metric names:Performance parameter tableAn example configuration file of special project is provided asspecial-projects.ymlNote: special projects invokes different API with ordinary metrics, so it will not consume your Cloud Monitor API invocation quota. But the API of special projects could be slow, so it is recommended to separate special projects into a standalone exporter instance.Metrics Metaaliyun-exportershipped with a simple site hosting the metrics meta from the CloudMonitor API. You can visit the metric meta inlocalhost:9525after launching the exporter.host:portwill host all the available monitor projectshost:port/projects/{project}will host the metrics meta of a certain projecthost:port/yaml/{project}will host a config YAML of the project's metricsYou can easily navigate in this pages by hyperlink.
|
alicloud-gateway-iot
|
No description available on PyPI.
|
alicloud-gateway-iot-edge
|
No description available on PyPI.
|
alicloud-gateway-iot-edge-py2
|
No description available on PyPI.
|
alicloud-gateway-iot-py2
|
No description available on PyPI.
|
alicona-converter
|
Alicona ConverterConverter for Surface Data FormatsThis script transforms the output format of the optical microscope by Alicona
to different input formats, for example the format used tribo-x.UsageThe basic usage is to call the script directlypython alicona_converter.pyor, if it has been installed by pip,python -m alicona_converter.
For more information on the usage, seepython alicona_converter -h.APIThis module can also be used to parse Alicona's output format directly to
a numpy array:from alicona_converter import parse_alicona_data
data = parse_alicona_data(filename)
|
alicorn
|
AlicornAlicorn is a Python grpc framework with built in dependency injection and middleware management.NB: This project is in alpha status at the moment, some functionality may be missing.fromalicornimportAlicorn,GrpcContext,Dependsfromhelloworld_pb2importHelloWorldRequest,HelloWorldResponsefromhelloworld_pb2_grpcimportHelloWorldServicerapp=Alicorn()app.debug=TrueclassDatabase:[email protected](HelloWorldServicer):defSayHello(self,request:HelloWorldRequest,context:GrpcContext,*,database:Database=Depends()):returnHelloWorldResponse(message=f"Hello{request.name}")if__name__=='__main__':app.run()FeaturesDependency Injectionbefore_request, after_request, after_request_teardown request handlers.proto defined grpc services or python-defined grpc servicesExtension SupportPlanned Future FeaturesIncoming data validation (using proto rules)More internal extensionsOther grpc server support (besides the Google implementation)RequirementsPython 3.7+grpcioInstallationFrom PyPi:pip install alicornorpipenv install alicornTo DoFinish DocumentationCommand-Line OptionsBetter examples
|
alicorn-sqlalchemy
|
Alicorn-SQLAlchemyAn Alicorn extension for SQLAlchemy
|
alida-arg-parser
|
No description available on PyPI.
|
alida-notebook-utils
|
No description available on PyPI.
|
alidayu
|
UNKNOWN
|
alidayu-py3
|
aldayu api for python3.x
|
aliddns
|
No description available on PyPI.
|
aliddns2
|
AliDDNS阿里云 Python DDNS 客户端 (https://github.com/kalixi/AliDDNS)PS: Fork fromhttps://github.com/rfancn/aliyun-ddns-client.中文 |English限制本版本的 DDNS client只支持自动更新 “A” 类型 IPv4 地址的 DomainRecord。其他类型不支持,因为它们需要以下值格式,而不是IP地址:NS,MX,CNAME类型 DomainRecord 需要域名格式值AAAA类型 DomainRecord 需要 IPv6 地址格式的值SRV类型 DomainRecord 需要名称.协议格式的值显式URL和隐式URL需要 URL 格式值先决条件下面是 AliDDNS 需要的一些第三方 python 库,你可以通过 pip 或 easy_install 安装:requestsnetifaces例如:pipinstallrequestsnetifaces安装1. 使用 cron下载所有文件到某个地方, 例如:/opt/aliddns将ddns.conf.example重命名为ddns.conf创建一个 cron 任务,定时执行python ddns.py, 例如:*/5****cd/opt/aliddns&&/usr/bin/pythonddns.py确保 cron 用户可以访问ddns.conf2. 使用 SystemD下载所有文件到某个地方, 例如:/root/tools/aliddns将ddns.conf.example重命名为ddns.conf复制ddns.timer和ddns.service到/usr/lib/systemd/system执行:root@local#systemctldaemon-reload
root@local#systemctlstartddns.timer
root@local#systemctlstatusddns.timer-l配置/etc/ddns.conf中需要设置的选项:access_idaccess_keydomainsub_domain可选的选项:type[DEFAULT]# access id obtains from aliyunaccess_id=# access key obtains from aliyunaccess_key=# it is not used at this moment, you can just ignore itinterval=600[DomainRecord1]# domain name, like google.comdomain=# subdomain name, like www, blog, bbs, *, @, ...sub_domain=# resolve type, 'A', 'AAAA'..., currently it only supports 'A'type=A[feature_public_ip_from_nic]enable=falseinterface=eth0开始使用在阿里云控制台手动创建 DNS 解析条目,例如:blog.guanxigo.com您可以在阿里云服务器上为该条目留下任何IP地址,如 192.168.0.1确保所有必需的选项都正确输入到ddns.conf启用您想要使用的功能确保ddns.conf对于设置cron作业的用户来说是可读的注意: 只更新本地配置文件和阿里云服务器中定义的域记录。常见问题问: 为什么报错The input parameter "Timestamp" that is mandatory for processing this request is not supplied.?答: 请检查参数 TimeStamp 的值是多少, 如果与正确时间相差较大,需要使用ntpdate将系统时间同步到正确的时间。问: 为什么报错Failed to save the config value?答: 您需要确保当前的 cron 用户有权限写/etc/ddns.conf文件。问: 为什么报错AttributeError: 'X509' object has no attribute '_x509'?答:PyOpenSSL 版本需要 >= 0.14,你可以尝试通过以下方法解决这个问题:sudoyumuninstallpython-requests
sudopipuninstallpyopensslcryptographyrequests
sudopipinstallrequests
|
aliddns-core
|
Python library for aliyun ddns core
|
aliddns-python
|
aliddns-pythonAn easy-to-use dynamic DNS(DDNS) tool for Alibaba Cloud.Use CasesYou have domain names hosted in Alibaba Cloud, and you want to setup DDNS.
DDNS is pretty usefull when you have public but dynamic IP from your ISP.
Some advanced home routers support DDNS of many kinds out of box,
but many cheap or old ones do not. This easy to use script allows you to setup
up Alicloud DDNS sync on your home PC or any python-enabled devices.Installationpipinstall--upgradealiddns-pythonQuickstart# update the given domain name DNS record with current public ippython-maliddns.ddns--key=<ACCESS_KEY>--secret=<SECERT_KEY>--record=www.yourdomain.comUsageJob Scheduling# update dns record every 5 mins using cron job# use `crontab -e` to edit the crob job# m h dom mon dow command*/5***python-maliddns.ddns--key=<ACCESS_KEY>--secret=<SECERT_KEY>--record=www.yourdomain.comDocumentationGet Your Access Keys from Alibaba CloudGetting a key pair is easy, and lets you to use more API features apart from the DNS one.
In order to get one, log into your Alibaba Cloud console and in the top navigation bar, hover with your mouse in your email address and click "accesskeys" as illustrated below.
<https://www.alibabacloud.com/blog/Dynamic-DNS-using-Alibaba-Cloud-DNS-API_459542>ReferencesOffical Alicloud DNS APIDynamic DNS using Alibaba Cloud DNS APIAlicloud OpenAPI ExplorerLICENSECopyright (c) 2019 cheng10
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
alidistlint
|
alidistlint- code linter foralidistrecipesalidistlintrunsshellcheckon the scripts inalidistrecipes andyamllinton their YAML headers, in addition to its own validation and checks on the YAML header and scripts in the recipe.InstallationTo installalidistlint, run:python3-mpipinstall--useralidistlintYou should also installyamllintandshellcheck, though this is optional.If you want to use the--changesflag, install its dependencies like this:python3-mpipinstall--user'alidistlint[git]'UsageRunalidistlint -hto get more information about its arguments.usage: alidistlint [-h] [-S] [-Y] [-H] [-f FORMAT] [-e | --changes COMMITS] RECIPE [RECIPE ...]You can disable individual checkers using-S/--no-shellcheckand-Y/--no-yamllintfor external linters, or-L/--no-scriptlintand-H/--no-headerlintforalidistlint's built-in linters.
By default, all checkers are run.Optionally, select the output format of errors using-f/--format.You can also makealidistlintlimit the warnings and notes it outputs.
Use the-e/--errors-onlyoption to omit them entirely, and only show critical error messages.Alternatively, you can limit non-critical messages to those that apply to changed code between the given commits using the--changesoption.
Errors are always shown, even if they apply to unchanged lines.
This can be useful in CI, to gradually transition to using this linter.Finally, pass one or multiple files to be checked toalidistlint.
You can use-for the standard input here, but be aware that this will produce spurious errors, as file names are meaningful for alidist recipes.Errors and warnings will be printed to standard output in the format you selected.If any messages with "error" severity were produced,alidistlintexits with a non-zero exit code.Shellcheck validationThe main build recipe (after the---line) is passed toshellcheck.Currently, toplevel keys ending in_recipeor_check(such asincremental_recipe) are also checked usingshellcheck.
This does not work for such keys specified inoverridesyet.There is a known issue with the checking of the above keys: if they do not start on a new line (using e.g.key: |), the reported line numbers for shellcheck errors will be off by one.Internal script checksThe following error codes are produced by the internal linter for scripts in recipes.
This linter checks for alidist-specific pitfalls and bad practices in shell scripts that shellcheck won't know about.
It can be switched off using-L/--no-scriptlint.
There is currently no way to disable individual checks.ali:script-type(error):
The contents of a*_recipeor*_checkvalue in the YAML header were not parsed as a string.
Perhaps you used a barefoo_recipe:, which results in anullvalue, not an empty string.ali:missing-modulefile(note):
The linter could not detect the creation of a Modulefile for this package, even though it has determined that one is needed.
Ideally, usealibuild-generate-moduleto create a Modulefile for you.
If you're generating a Modulefile yourself, make sure that it starts with a#%Module1.0comment and that this string appears in the script.ali:consider-a-g-m(note):
The linter detected that you're manually generating a Modulefile in this recipe.
You should prefer usingalibuild-generate-module, which creates the common Modulefile boilerplate for you.
If usingalibuild-generate-module, you can still append your own Modulefile commands to the generated file.ali:bad-shebang(note):aliBuildruns scripts usingbash -e.
Non-trivial scripts (i.e. the "main" script in a recipe andincremental_recipe, if provided) must start with a#!/bin/bash -eline to signal this toshellcheck.
For other scripts, this check is only enforced if the script in question already has a shebang line, to avoid confusion.ali:colons-prepend-path(error):
Modules 4 does not allow colons inprepend-path, but the linter detected that you used them.
Use multipleprepend-pathcalls to prepend multiple things to$PATHinstead.ali:dyld-library-path(note):
On MacOS, theDYLD_LIBRARY_PATHvariable is not propagated to subprocesses if System Integrity Protection is enabled.
Recipes must not rely on this variable.
If there is a problem and libraries cannot be found at runtime, thenaliBuild's relocation code must be fixed.ali:masked-exitcode(note):
Commands of the formmkdir ... && rsync ...are an often-copy-pasted pattern in alidist recipes.
This is usually used to install Modulefiles.
However, this line does not behave correctly if themkdirfails: in that case, thersyncis silently skipped.
If you find a false positive for this check, please open an issue.Internal YAML header validationThe following error codes are produced by the internal linter for YAML headers.
It can be switched off using-H/--no-headerlint.
There is currently no way to disable individual checks.ali:empty(error):
The YAML header was not found.
It must be terminated by a\n-terminated line containing nothing but three dashes (---).ali:parse(error):
The YAML header could not be parsed or was fundamentally invalid.
This is produced when PyYAML'syaml.loadraises an error or when the provided YAML header is not a dictionary.key: valuepairs must be provided as the YAML header.ali:schema(error):
The YAML header did not conform to its schema.
See the error message for more details.ali:key-order(warning):
Thepackage,versionandtagkeys were not found in the correct order.
These keys should be the first in the file, in the above order (if present).
Additionally, therequireskey must come beforebuild_requires.ali:replacement-specs(warning):
Either theprefer_system_checkseems to select a replacement spec, but
none are defined using theprefer_system_replacement_specskey, or
replacement specs are defined, but none are ever selected by theprefer_system_check.GitHub Actions integrationYou can runalidistlintas part of a GitHub Action using-f github. In that case,alidistlintwill annotate files with the errors found in them.alidistlintwill exit with a non-zero exit code if any errors were found (but not if only warnings were produced), which will cause the workflow to fail.Vim integrationPut the following in your.vimrc:autocmdBufNewFile,BufRead*alidist/*.shsetmakeprg=alidistlint\-f\ gcc\ %errorformat=%f:%l:%c:\ %t%*[a-z]:\ %m" If you want to automatically re-run the linter on every save:autocmdBufWritePost*alidist/*.shmakeThen you can use:maketo run the linter,:clto see the error list, and navigate from one error to another using:cp(previous),:cc(current) and:cn(next).Emacs integrationHere is a simple Flycheck checker usingalidistlint.
You can set this to check alidist recipes.(require'flycheck)(flycheck-def-executable-varalidist"alidistlint")(flycheck-define-checkeralidist"A syntax checker and linter for alidist recipes.";; `flycheck-alidist-executable' automatically overrides the car of the;; :command list if set and non-nil.:command("alidistlint""--format=gcc"source):error-patterns((errorline-start(file-name)":"line":"column": error: "(message)" ["(id(minimal-match(one-or-morenot-newline)))"]"line-end)(warningline-start(file-name)":"line":"column": warning: "(message)" ["(id(minimal-match(one-or-morenot-newline)))"]"line-end)(infoline-start(file-name)":"line":"column": note: "(message)" ["(id(minimal-match(one-or-morenot-newline)))"]"line-end)))(add-to-list'flycheck-checkers'alidist)
|
alidock
|
alidock=======Run your ALICE environment from a container. InstallDocker,then:bash <(curl -fsSL https://raw.githubusercontent.com/alidock/alidock/master/alidock-installer.sh)Windows users caninstall the package with pipinstead.You may need to close and reopen your terminal as advised. Run alidock now:alidockYou are instantly dropped in a shell with a consistent ALICE environment from a Docker container.From there you can directly run, for example:aliBuild init O2@dev --defaults o2
aliBuild build O2 --defaults o2and it will download the precompiled binaries for you.Your home directory in the container, called/home/alidock, is available from outside thecontainer in~/alidock. This means you can use your favourite text editor or IDE from your laptop,no need to edit from inside the container.📜 Full documentation availableon the Wiki.
|
ali-domain-sdk
|
No description available on PyPI.
|
alie
|
📘 learn more onGitHub!
|
alieenpdf
|
Failed to fetch description. HTTP Status Code: 404
|
alien
|
No description available on PyPI.
|
alienbuild
|
A large code and asset build system written in python.
|
aliencomm
|
No description available on PyPI.
|
aliendev-api
|
No description available on PyPI.
|
aliendev-cdk
|
CDK ModuleThe CDK (Cloud Development Kit) module is a critical component of the serverless API, allowing clients to manage the deployment and configuration of the infrastructure required for the API's operation. It provides a simple and intuitive way to define and configure the necessary resources, such as AWS Lambda functions, API Gateway, and IAM roles, that are needed to run the API effectively.By leveraging the power of the CDK, clients can easily define and deploy their serverless API infrastructure using familiar programming languages like TypeScript or Python. The CDK abstracts the underlying cloud infrastructure, providing a more user-friendly way to manage and maintain the API's components.Some of the key features of the CDK module include:Easy-to-use APIs for defining and deploying infrastructure resourcesBuilt-in support for popular AWS services like Lambda, API Gateway, and IAMComprehensive documentation and examples to get started quicklyAutomatic dependency management and resource tracking to simplify maintenance and updatesUsing the CDK module, clients can quickly and easily deploy their serverless API with confidence, knowing that the underlying infrastructure is well-defined and optimized for performance and scalability.To get started with the CDK module, refer to the documentation and examples provided in the cdk directory of this repository. From there, you can explore the APIs and learn how to define and deploy your serverless API infrastructure with ease.How to installpip install aliendev-cdkCreate your first time projectCreate project base templatealiendev-cdk initand enter your project nameFor Register aliendev accountaliendev-cdk registerLogin into your accountaliendev-cdk loginSign Out usingaliendev-cdk logoutDeploy your projectaliendev-cdk deploy
|
aliendev-logger
|
No description available on PyPI.
|
aliendev-sentiment
|
AlienDev Sentiment AnalyzerAlienDev Sentiment Analyzer is a Python library that allows you to analyze the sentiment of textual content. This library makes use of the Google Translator API for translation and the VADER Sentiment Analysis tool for sentiment analysis.InstallationYou can install AlienDev Sentiment Analyzer using pip:pipinstallaliendev-sentimentUsageHere's an example of how to use AlienDev Sentiment Analyzer:fromaliendev_sentimentimportSentimentAnalyzer# Define the content dictionarycontent={"content":"..."# Your content goes here}# Create a SentimentAnalyzer instancesentiment=SentimentAnalyzer(content=content.get("content"))# Analyze sentimentresponse=sentiment.analyze_sentiment()print("Sentiment:",response)Replace the"..."placeholder in thecontentdictionary with your actual textual content that you want to analyze for sentiment.OutputTheanalyze_sentimentmethod of theSentimentAnalyzerclass will return a sentiment label, which could be one of the following:"Positive""Neutral""Negative"DisclaimerThis library is intended for educational and informational purposes only. The sentiment analysis results provided are based on algorithms and may not accurately reflect human sentiment. Decision-making based on the sentiment analysis results should be done with caution.
|
alienHTML
|
alienHtmlA Python package to help with HTML development.Install:pip install alienHTMLLatest Version:pip install alienHTML==0.0.7Features:Edit or create a HTML file.Open HTML files in your browser.Print the contents of the HTML file in the shell wth indentation.Add Headings, Images and Pragraphs.Example:fromalienHTMLimport*# "w" is the mode to open, in this case write.mypage=WebPage("/path/to/file/to/create/or/edit","w",tabhead="Hello World",bgcolour="powderblue",icon="path/to/icon.ico")# If you put it as "a" it switches to edit mode# For tabhead, bgcolour and icon, if not set it will automatically set itself to some defaults.# This creates a heading of the largest size as the number is one.# It will ask you where you want it in the <body> section of your codemypage.Heading("Hello World",1)# Similar for images, just with different parameters. The second is the alt text.mypage.Image("/path/to/image.png","Image!")mypage.showfile()# Prints the contents of the file with line numbers and indentation.mypage.openpage()# Opens the HTML file in web browser.Outputs:Ask you where to put code for heading and image.Prints the file in shell.Opens the page in a web browserTo do:Add more web page features.Make the showfile function open the HTML file in web browser, so there is syntax highlighting.Credits:Made by TomTheCodingGuy
|
alien-ink
|
No description available on PyPI.
|
alien-invasion
|
Testtest package
|
alien-invasion1
|
No description available on PyPI.
|
alien-invasion-spbe
|
Alien Invasion!This is a very simple python game made in pygame that is like space invaders.ControlsUse the mouse to start the game andthen use the left and right buttons to control your ship and the spacebar to fire. Try to beat your own high score!
|
alien-jdl2makeflow
|
RunAliEnJDLs on multiple platforms
usingMakeflow.RequirementsMakeflowneeds to be
installed on your system. Makeflow is part of the Cooperative Computing
tools (cctools). To install it,download the latest version of
cctoolsthen
unpack, compile and install it (we are assuming 6.1.1 is the latest,
check the download page first):cd /tmp
curl -L http://ccl.cse.nd.edu/software/files/cctools-6.1.1-source.tar.gz | tar xzf -
cd cctools-*-source/
./configure && make -j10
sudo make installRun the last command (make install)as rootto install it
system-wide. Adjust-j10to the number of parallel cores you want to
use during the build. If you do not have root privileges:cd /tmp
curl -L http://ccl.cse.nd.edu/software/files/cctools-6.1.1-source.tar.gz | tar xzf -
cd cctools-*-source/
./configure --prefix=$HOME/cctools && make -j10 && make install
echo 'export PATH=$HOME/cctools/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=$HOME/cctools/bin:$LD_LIBRARY_PATH' >> ~/.bashrcWe are installing under~/cctoolsbut you can use the directory you
want. Also, we are assuming your shell configuration file is~/.bashrc, adjust it according to your shell.Get jdl2makeflowAs easy as:sudo pip install alien-jdl2makeflowIf you cannot install it as root, you will probably have to export some
Python variables to make it work. If you have a user installation of
some Python distribution likeAnacondathis is probably
already done for you.Basic usageGet and configure the JDL used to run a Monte Carlo on AliEn, and all
the required files. Normally you would only require theCustom.cfgfile. The JDL can contain variable overrides in a way that AliEn will
ignore them and they will only be considered by the Makeflow workflow:
this allows you to keep a single JDL that works both locally and on the
Grid.Run:jdl2makeflow /path/to/job.jdlBy default, it will print a summary and create all necessary files under
a working directory calledwork(override with-w). You then
need to move to the working directory and run:cd work
makeflowRelevant JDL variablesNot all JDL variables are used for local use, and some of them are
interpreted in a different way.Executable: the AliEn path of the executable to run. For local
use, we will only consider the program name and strip the path, and
search for it in the following directories in order:full path firstbasename (must be in$PATH)$ALIDPG_ROOT/bincurrent working directorySplitArguments: arguments to pass to the executable.InputFile: list of files that need to be made available in the
job’s working directory for the job to run. Only the basename of the
file will be considered and it will be searched for in the current
directory. No AliEn access will be performed.Output: a list telling what of the files produced by the job need
to be copied to the destination. Files can also be placed in zip
archives. See the example JDL for more information.OutputDir: the output directory for each job. This is normally an
AliEn path, but locally we can either specify a XRootD path
(root://...) or a local path. Note that XRootD paths might
require authentication information to be available to the job.Packages: packages to be loaded in the Grid environment. They are
expected from CVMFS, and CVMFS must be available locally. You can
also use local installations for testing, seeSourceEnvScriptbelow.JDLVariables: list of arbitrary variables from the JDL that will
be exported in the job’s environment. The variable name will be
altered. If, for instance, you want to export the JDL variableArbitraryVar, this will be available to your jobs asALIEN_JDL_ARBITRARYVAR. The same convention is used by AliEn for
Grid jobs.Split: determine how many jobs have to be run of the kind
specified by the JDL. The syntaxproduction:123-456tells the
script to run jobs with a different ID from 123 to 456 included
(that’s 334 jobs). You will probably want to change it for local use
as the range is very large on the Grid. The job index is made
available to some other variables through the#alien_counter#variable, see below.Since the same JDL will be used for running many jobs, it is in some
cases useful to distinguish between output directories, and to tell the
job what is its index. You can use in variable values:#alien_counter#: will be replaced with the job index#alien_counter_05i#: will be replaced with the job index
zero-padded to 5 digits (any format supported byprintfcan be
specified of course)See the examples for more information.Extra JDL variablesThe following JDL variables are interpreted only byjdl2makeflowand
will be ignored by AliEn.SourceEnvScript: path to an environment script to be sourced in
order to load the required packages. If this script is defined, it
will be automatically loaded by each job, andPackageswill be
ignored. This is useful for local development when one wants to test
changes with a local AliRoot build. IfSourceEnvScriptis
specified, CVMFS is not required for packages.ExtraVariables: same asJDLVariables, but the variables
listed (which must be defined in the JDL) will be exported in the job
environment as-is, with their name not manipulated. So, the variableArbitraryVarwill be exported asArbitraryVar.NextStages: the toplevel JDL runs several jobs of the same kind,
but other tiers of processing will follow (merging stages mostly).
This list tells the local workflow what are the next stages (order
does not matter). For the moment, only the valuesFinalQAandSpacePointCalibrationare supported. This variable allows you to
run those stages without supplying their respective JDLs (parameters
will be deduced from the current one and modified accordingly).QADetectorInclude: string with a list of space-separated detector
names to be included when generating the QA plots. Leave empty for
including all detectors. In order to expose it to the job you must
add it toJDLVariables.QADetectorExclude: exclude detectors from QA plots. Same format
asQADetectorInclude. Has to be added toJDLVariablestoo.DontArchive: set it to1to store output files, as specified
inOutput, as they are, without compressing them. Useful for
debug.SaveAll: set it to1to save all files produced by jobs,
ignoringOutputcompletely. Files will not be compressed in zip
files. Useful for debug.Overriding JDL variablesAliEn JDL files have variables of type “string” and “list”:StringVar = "this is a string";
ListVar = { "this", "is", "a", "list" };In the most common case you need to override some variables for the
local use. For instance, the variableOutputDirrepresents the AliEn
output directory and does not have any sense locally. You can override
every variable by defining a new variable with the same name and_overrideappended:OutputDir = "/alien/path/not/making/sense/locally";
OutputDir_override = "/home/myuser/joboutput";The latter will be considered by Makeflow. You can also append to
strings and lists. For instance, theSplitArgumentsvariable is a
string representing the arguments to pass to the executable, but in the
local scenario you might want to pass more arguments. Appends work the
same as overrides, but you will use the_appendname at the end:SplitArguments = "--run 244411 --mode full --uid #alien_counter# --nevents 200 --generator Pythia8_Monash2013 --trigger Custom.cfg";
SplitArguments_append = " --ocdb $OCDB_PATH";or, you need to provide the input directory with credential
informations:InputFile = { "LF:/alice/cern.ch/user/a/aliprod/LHC16h8a/Custom.cfg" };
InputFile_append = { "my-proxy" };Bugs and issuesThis project was originally conceived to run ALICE Monte Carlos locally,
or on local batch farms (includingMesos!) with Makeflow,
using the exact same JDL files one would use on the AliEn Grid.Its support is therefore very limited to the ALICE Monte Carlo use
cases, but we are extending it to support more use cases more flexibly.In case of problems pleaseopen an
issue.target:https://badge.fury.io/py/alien-jdl2makeflow
|
alien-onslaught
|
Alien-OnslaughtAlien Onslaught is an action-packed game that will test your shooting skills and reflexes. The game is set in outer space, where you must shoot fleets of aliens to reach higher levels and increase your high score. With each level, the game becomes more challenging as the aliens become stronger and faster, bosses are starting to appear, and more asteroids rain down from above.The game offers a range of game modes (e.g.: Boss Rush, Endless Onslaught, Cosmic Conflict (PVP)), including single-player and multiplayer modes, where you can choose to battle it out with friends or take on the aliens alone. In game you can also get a variety of ship power-ups, including increased ship speed, bullet speed, and fire power, as well as shields that protect you from enemy fire. It also includes a high score system where players can compete with others for the top spot on the leaderboard, boss fights, different weapons, different player ship types, and more other features.Requirements:Python 3.7 or laterPygame 2.0 or laterGame Launch:pip install alien-onslaughtpython -m src.alien_onslaughtControls:Gameplay:Player 1 (Thunderbird):Move: W, A, S, DFire: SpaceLaser: CLaunch Missiles: XPlayer 2 (Phoenix):Move: Arrow KeysFire: EnterLaser: R-ShiftLaunch Missiles: R-CtrlUI Controls:Toggle Fullscreen: FPause: PWhile Paused:Save Game: SRestart: RReturn to Game Menu: ESCReturn to Main Menu: MQuit: QGame images can be foundhere
|
alienpy
|
alien.py - Python interface to websocket endpoint ofALICEGrid ServicesQuick containerized testing:singularity run library://adriansev/default/alienpy:latest [cmd]orsingularity run oras://registry.cern.ch/asevcenc/alienpy:latest [cmd]latestusuallywould point to master but not always.(if desired and needed, request by email a new latest tag)seeherewhat tags are available and their dates of creation.The docker images can be found @DockerHubdocker run -it \
--user $(id -u):$(id -g) \
--workdir="/home/$USER" \
--env TMPDIR="${TMPDIR:-/tmp}" \
--volume="/etc/group:/etc/group:ro" \
--volume="/etc/passwd:/etc/passwd:ro" \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/home:/home" \
adriansevcenco/alienpy.dock:latest [cmd]if no cmd is passed, the shell form will startBasic usageCan be used as command mode and interactive mode :Command mode :alien.py <command>e.g :alien.py pwdN.B.command/arguments must be quoted to avoid being interpreted by the shell:alien.py 'rm my_alien_dir/*'Interactive/shell mode e.g :alien.py
Welcome to the ALICE GRID
support mail: [email protected]
AliEn[asevcenc]:/alice/cern.ch/user/a/asevcenc/ >pwd
/alice/cern.ch/user/a/asevcenc/
AliEn[asevcenc]:/alice/cern.ch/user/a/asevcenc/ >whoami
asevcenc
AliEn[asevcenc]:/alice/cern.ch/user/a/asevcenc/ >For both command and shell mode multiple commands can be issued separated by;The interactive mode save the command history in${HOME}/.alienpy_historyand it can be navigated with Up/Down keys!is understood as running into shell whatever command follows|pipe whatever output of AliEn command to a shell command (that follows after the first(only the first)|)Environment steeringThere are a few environment variables that influence the mechanics of the script :JALIEN_TOKEN_CERT, JALIEN_TOKEN_KEY - will overwrite the defaults; they are either full path certificate,key token files OR their respective contentsIf set the following will be honored: X509_USER_CERT, X509_USER_KEY, X509_CERT_DIR or X509_CERT_FILEALIENPY_TIMEOUT will change the interval for keep-alive mechanics.ALIENPY_CONNECT_TRIES - default = 3 : number of connect trialsALIENPY_CONNECT_TRIES_INTERVAL - default = 0.5 : seconds between connection trialsFor debugging purposes there are a few environment toggles :ALIENPY_JSON - print the unprocessed json message from the serverALIENPY_JSONRAW - print the unprocessed byte stream message from the serverALIENPY_JCENTRAL - it will connect to this server, ignoring any other optionsALIENPY_NO_STAGGER - disable staggered parallel host resolution and socket creation (seeRFC8305)ALIENPY_DEBUG - detailed debug meesages will be found in ALIENPY_DEBUG_FILEALIENPY_DEBUG_FILE - set the location of log fileALIENPY_DEBUG_APPEND - is set the output will be appended to the present log file. if not the file will be overwritten.ALIENPY_TIMECONNECT - if set will report time for websocket creation - e.g.ALIENPY_TIMECONNECT=1 alien.py pwdALIENPY_TIMING - report detailed operation timing in the log file.DEBUG file copy operations:ALIENPY_KEEP_META - keep the metafile generated for download operations. Can be directly used with xrdcp.XRD_LOGLEVEL='Dump'XRD_LOGFILE=xrdlog.txtSee also the native XRootD environment toggles:docsAuthenticationThe authentication process needs the presence of a X509 certificate (enrolled into ALICE VO, seehere)
and of a CA certificates directory for verification.
The default CA location that will be searched is within alice.cern.ch cvmfs repository
If not found, the CApath will default to /etc/grid-security/certificates
If these locations are not available, onemustset X509_CERT_DIR to a valid locationCommand usage and examplesThe list of available commands can seen with:?orhelpCommand help can be listed with:? command,help command,command -hStorage related operationsThis section refer to any copy to/from grid or file interactions.cat/more/lesswill download the target lfn to a temporary file and will act upon it whilevi/nano/mcedit/editwill, after the modification of downloaded temporary, backup the existing lfn, and upload the modified fileThe target file upload can support grid specifiers like those described incpcommand e.g.edit my_file@disk:2,SE1cpoptioncp can take as arguments both files and directories and have the following options:alien.py cp -h
Command format is of the form of (with the strict order of arguments):
cp <options> src dst
or
cp <options> -input input_file
location prefixes are: file: | file:// | alien: | alien://
if one prefix is specified the other operator is considered of the other kind (no local -> local, or grid->grid operations allowed)
if no prefix is specified, the src will be _first_ checked if local and then if remote.
-input argument is a file with >src dst< pairs
after each src,dst can be added comma separated specifiers in the form of: @disk:N,SE1,SE2,!SE3
where disk selects the number of replicas and the following specifiers add (or remove) storage endpoints from the received list
options are the following :
-h : print help
-f : replace destination file (if destination is local it will be replaced only if integrity check fails)
-P : enable persist on successful close semantic
-cksum : check hash sum of the file; for downloads the central catalogue md5 will be verified;
for uploads (for xrootd client > 4.12.0) a hash type will be negociated with remote and transfer will be validated
-y <nr_sources> : use up to the number of sources specified in parallel (N.B. Ignored as it breaks download of files stored in archives)
-S <aditional TPC streams> : uses num additional parallel streams to do the transfer. (max = 15)
-chunks <nr chunks> : number of chunks that should be requested in parallel
-chunksz <bytes> : chunk size (bytes)
-T <nr_copy_jobs> : number of parralel copy jobs from a set (for recursive copy); defaults to 8 for downloads
-noxrdzip: circumvent the XRootD mechanism of zip member copy and download the archive and locally extract the intended member.
N.B.!!! for recursive copy (all files) the same archive will be downloaded for each member.
If there are problems with native XRootD zip mechanism, download only the zip archive and locally extract the contents
for the recursive copy of directories the following options (of the find command) can be used:
-glob <globbing pattern> : this is the usual AliEn globbing format; N.B. this is NOT a REGEX!!! defaults to all "*"
-select <pattern> : select only these files to be copied; N.B. this is a REGEX applied to full path!!!
-name <pattern> : select only these files to be copied; N.B. this is a REGEX applied to a directory or file name!!!
-name <verb>_string : where verb = begin|contain|ends|ext and string is the text selection criteria.
verbs are aditive : -name begin_myf_contain_run1_ends_bla_ext_root
N.B. the text to be filtered cannont have underline <_> within!!!
-parent <parent depth> : in destination use this <parent depth> to add to destination ; defaults to 0
-a : copy also the hidden files .* (for recursive copy)
-j <queue_id> : select only the files created by the job with <queue_id> (for recursive copy)
-l <count> : copy only <count> nr of files (for recursive copy)
-o <offset> : skip first <offset> files found in the src directory (for recursive copy).,..are interpreted for all grid names (lfns)%ALIENis converted to user AliEn home directorylfns that don't start with a/will have the current directory appended before being processedMiscellaneousThe shell promptIt can show date and/or local directory:prompt datewill toggle on/off the dateprompt pwdwill toggle on/off the local current directoryFor permanent setting the following are env variables are available : ALIENPY_PROMPT_DATE, ALIENPY_PROMPT_CWDAliEn[asevcenc]:/alice/cern.ch/user/a/asevcenc/ >prompt date
2020-02-07T16:49:05 AliEn[asevcenc]:/alice/cern.ch/user/a/asevcenc/ >
AliEn[asevcenc]:/alice/cern.ch/user/a/asevcenc/ >prompt pwd
AliEn[asevcenc]:/alice/cern.ch/user/a/asevcenc/ local:/home.hdd/adrian/work-GRID/jalien_py >CWD persistenceDefault behaviour is to save (and then restore) the last used CWD.This bevahiour can be disabled with the env var ALIENPY_NO_CWD_RESTORElsaliasesll,la,llaare aliases tols -l,ls -a,ls -laCustom aliasesA fixed file${HOME}/.alienpy_aliasescan be used to define alias=string pairs that will be used(translated) in the usage of alien.py. One can domyalias=cmd1;cmd2;cmd3and themyaliasstring will be replaced by it's value when used.Python shelltermcommand will open anPythonshell within the context of alien.py and with a session object loadedAPI usagesee examples directory
|
alienware-13r3-alien-effects
|
Alien Effects for Alienware 13 R3alieneffects-13r3is an lightweight and highly customizable application to control LED backlights (alien effects) of Alienware 13 R3 laptop in linux.Installation and usagepython version3.6 is recommended3.4 may not work2 is strongly discouragedsudo pip3 install alienware-13r3-alien-effectsto installTo install from source, clone this repo andsudo python3 setup.py installsudo alieneffects-13r3 --THEME_FILE <path-to-theme-file>to apply a themesudo alieneffects-13r3to open a Textual User Interface where you can select themesFirst field is the themes directoryAfter setting it, a list of files in the that directory will appear belowBy hovering through them, you can see the overview of each theme on the right panelPress enter to apply a themeSome themes have stochasticity (randomness) in them, so applying same theme multiple times can lead to different themesConfig fileThemes directory by default will be your home directoryYou can write a config file.alieneffects-13r3.jsonto specify themes directory{
"THEMES_DIRECTORY": "/home/foo/bar/themes"
}Writing your own themesThe log will be written to.alieneffects-13r3.logTheme files are also json files and can contain following keysDESCRIPTION - describes the themeTEMPO - the frequency of blinking and/or morphingDURATION - duration of each effectZONES - sequences of each zoneex. POWER_BUTTONex.SET_COLOR, COLORBLINK_COLOR, COLORMORPH_COLOR, COLOR1, COLOR2LOOP_SEQUENCESame sequence can be applied for multiple zones by delimiting zones with '|'If an effect does not have a color, a random color will be choosenThe simplest theme is to switch off all lights{
"DESCRIPTION": "sets all zones to black color i.e. switches off all lights",
"ZONES": {
"POWER_BUTTON|ALIENWARE_LOGO|ALIEN_HEAD|LEFT_KEYBOARD|TOUCH_PAD|MIDDLE_LEFT_KEYBOARD|MIDDLE_RIGHT_KEYBOARD|RIGHT_KEYBOARD": [
{
"EFFECT": "SET_COLOR",
"COLOR": [
0,
0,
0
]
},
{
"EFFECT": "LOOP_SEQUENCE"
}
]
}
}The random theme sets random color to all zones{
"DESCRIPTION": "set same random color for all zones",
"TEMPO": 300,
"DURATION": 11000,
"ZONES": {
"ALIENWARE_LOGO|ALIEN_HEAD|LEFT_KEYBOARD|TOUCH_PAD|MIDDLE_LEFT_KEYBOARD|MIDDLE_RIGHT_KEYBOARD|RIGHT_KEYBOARD": [
{
"EFFECT": "SET_COLOR"
},
{
"EFFECT": "LOOP_SEQUENCE"
}
]
}
}Introduction - Reverse EngineeringAlienware 13 R3 has 8 configurable light zones as listed in the table below.All lights can be controlled via USB protocol.For this specific devicevendor Id = 0x187candproduct Id = 0x0529Commands can be passed using control transfers of USB protocol.Note that this application can only be used for Alienware 13 R3 model, for other models refer toAlienfxby trackmastersteveControl transfer: Write operation parametersbmRequestType = 0x21
0... .... : Host to Device
.01. .... : Request Type = Class
...0 0001 : Recipient = Interface
bRequest = 9
wValue = 0x0202
wIndex = 0Control transfer: Read operation parametersbmRequestType = 0xa1
1... .... : Device to Host
.01. .... : Request Type = Class
...0 0001 : Recipient = Interface
bRequest = 9
wValue = 0x0202
wIndex = 0CommandsCommandPacket Structure (bytes)DesciptionCommentReset2 7 t 0 0 0 0 0 0 0 0 0t : type, t=3 : reset all off and stops the execution of sequences t=4 : reset all onShould call before every change. This takes some time, and you should wait until the operation ends. Premature commands might fail.Get status2 6 0 0 0 0 0 0 0 0 0 0S : Sequence ID, Z : ZoneCan use this to wait until status is readyMorph2 1 S Z Z Z r g b R G BS : Sequence ID, Z : ZoneColor changes fromr g btoR G B. All bands use 8-bit color encoding. So each value must be between 0-255.Pulse2 2 S Z Z Z r g b 0 0 0S : Sequence ID, Z : ZoneSimple set2 3 S Z Z Z r g b 0 0 0S : Sequence ID, Z : ZoneLoop2 4 0 0 0 0 0 0 0 0 0 0S : Sequence ID, Z : ZoneWithout this, LEDs will go off after walking through the user-specified color sequence. TODO: how does this know which sequence is the target? The last one mentioned? What happens if sequences are interleaved?)Execute2 5 0 0 0 0 0 0 0 0 0 0S : Sequence ID, Z : ZoneThis must be called at the end. Start executing color sequencesSave next command2 8 m 0 0 0 0 0 0 0 0 0m : mode, m=01: Initial State m=2: Plugged in - Sleep; Only the power-button works in this mode? m=5: Plugged in - Normal m=6: Plugged in - Charging m=7: On Battery - Sleep m=8: On Battery - Normal m=9: On Battery - LowSave the next command to the specified mode. Must be followed by an Action or LoopSave all2 9 0 0 0 0 0 0 0 0 0 0Save slots permanently. If this command is not called, data slots will be lost on rebootTempo2 e t t 0 0 0 0 0 0 0 0t: tempoAlienFX sets this value between 00:1e ~ 03:ae.Zone codesA 16 bit code space is to reference each light zone.One hot encoding is used; i.e. address for each zone has 1 at a unique place and 0's elsewhereMultiple zones can be addressed by ORing their codesFor example to address the entire keyboard use 0x1|0x2|0x4|0x8=0xF codeA lot more zone codes and command codes might exist, which can do things we dont know about (yet),For example setting multiple zones to different colors and such stuffZone Alienware 13 R3BinaryHexKeyboard right000 0000 0000 00010x0001Keyboard middle-right000 0000 0000 00100x0002Keyboard middle-left000 0000 0000 01000x0004Keyboard left000 0000 0000 10000x0008unknown/unused000 0000 0001 00000x0010Alien head000 0000 0010 00000x0020Alienware logo000 0000 0100 00000x0040Touch pad000 0000 1000 00000x0080Power button000 0001 0000 00000x0100How it works?Simple Set Color exampleSend a reset commandSend a set color effect command (to say touch pad)Send a loop commandSend an execute commandThe touch pad color changes and stays put.
If the loop command is not issued then the color goes away after a certain time.Blink or Morph exampleSend a reset commandSend a tempo commandSend a blink effect command (to say touch pad)Morph effect command needs 2 colorsSend a loop commandSend an execute commandBlink effect and Morph Effect need an extra tempo command, which determines the rate of blinking or morphing.Multiple effects at different zonesSend a reset commandSend a tempo commandSend a blink effect command (to say touch pad)Send a morph effect command (to say logo)Send a loop commandSend an execute commandThe blinking happens for sometime and stops.
Then morphing happens for sometime and stops.
This happens because both are set on same sequence.Multiple effects at different zones simultaneouslySend a reset commandSend a tempo commandSend a blink effect command on sequence 1 (to say touch pad)Send a morph effect command on sequence 2 (to say logo)Send a loop commandSend an execute commandThe blink and morphing happens simulataneously.
But the blinking stops after some time.
This happens because loop command affects the latest sequence issued before it.
So we need to send two loop commands after every set of commands belonging to one sequenceMultiple effects at different zones simultaneously and continuouslySend a reset commandSend a tempo commandSend a blink effect command on sequence 1 (to say touch pad)Send a loop commandSend a morph effect command on sequence 2 (to say logo)Send a loop commandSend an execute commandThe blink and morphing happens simulataneously and continously.
Multiple zones can be referenced at once for an effect as described in Zone codes sectionMiscSome zones (like power button) seems to be only be accessible in some states (like pugged in, on battery, on battery low) onlyIf same zone is addressed in different sequences flashing can happenIf you cannot control touch pad, setTrackpad backlighttoEnablein BIOS settingsDisclaimerAll the information here is obtained via trail and error reverse engineering, because the alienware lights software doesn't seem to be opensourceThere is no conclusive evidence that these methods are the best way to goBut they do work and did no harm to my system until nowReferencesAlienfxby trackmastersteve
|
alienX
|
coming soon
|
aliexpress-api-client
|
UNKNOWN
|
aliexpress-api-wrapper
|
aliexpress-api-wrapperA API AliExpress fornece funcionalidades para buscar produtos na plataforma AliExpress.InstalaçãoPara utilizar a API AliExpress, é necessário ter o Python instalado. Você pode instalar a API através do pip:pipinstallaliexpress-api-wrapperUso BásicoInicializaçãoPara começar a usar a API AliExpress, é necessário inicializar a classeAliExpress.fromaliexpress_apiimportAliExpressaliexpress=AliExpress(currency="USD",language="en")Métodosfetch_productEste método permite recuperar informações detalhadas sobre um produto específico. Você pode fornecer o ID do produto ou a URL do produto como entrada.product_data=aliexpress.fetch_product(id="1234567890")ouproduct_data=aliexpress.fetch_product(url="https://www.aliexpress.com/item/1234567890.html")search_productsEste método permite pesquisar produtos na plataforma AliExpress com base em uma consulta de pesquisa.search_results=aliexpress.search_products(query="smartphone",page_number=1)ParâmetrosAliExpresscurrency(str): A moeda na qual os preços dos produtos serão exibidos. O padrão éUSD.language(str): O idioma em que a plataforma AliExpress será exibida. O padrão éen.fetch_productid(str, opcional): O ID único do produto. Se fornecido, a URL é ignorada.url(str, opcional): A URL do produto na plataforma AliExpress. Se fornecido, o ID é ignorado.search_productsquery(str): A consulta de pesquisa para encontrar produtos na plataforma AliExpress.page_number(int, opcional): O número da página de resultados de pesquisa. O padrão é1.RetornoAmbos os métodosfetch_productesearch_productsretornam um dicionário contendo informações sobre os produtos correspondentes ou os resultados da pesquisa.ExceçõesA API pode levantar exceções em casos de falhas na comunicação com o servidor ou em situações inesperadas. Certifique-se de tratá-las adequadamente em seu código.Exemplo CompletoAqui está um exemplo completo de uso da API:fromminha_api_aliexpressimportAliExpressaliexpress=AliExpress(currency="USD",language="en")product_data=aliexpress.fetch_product(id="1234567890")print(product_data)search_results=aliexpress.search_products(query="smartphone",page_number=1)print(search_results)Isso é tudo! Esta é a documentação básica para a API AliExpress. Sinta-se à vontade para explorar mais os métodos e personalizar conforme necessário.
|
ali-express-craper
|
Failed to fetch description. HTTP Status Code: 404
|
aliexpress-page-parser
|
aliexpress-page-parserCurrently only support product list page and detail page parsing. All fields use same encoding 'utf-8'.Product List fields:productsproduct_id - Product IDtitle - Product titleurl - Product urlprice - Product pricerating - Product ratingfeedback - Product feedbacksorders - Product ordersnext_page_urlProduct detail fields:product_idmeta_keywordsmeta_descriptiontitleratingfeedbackordersbreadcrumbsnameurlcidspecs - Array of specificationsgallery_images - Array of image urlsoptionsidnameskusidnameimg_urlsku_productsfreightcompanycurrencyamounttimetrackingservice_namesend_goods_countrystoreidnameurltop_ratedopen_datelocationfollowingspositivespositive_rateContentaliexpress_page_parser.product_list_parser.ProductListParseraliexpress_page_parser.product_detail_parsers.ProductDetailParserInstallationThe simplest way is to install it viapip:pip install aliexpress-page-parserRun Testpip install -r requirements-dev.txttox
|
ali-express-scraper
|
AliExpress ScraperAliExpress Scraperis a tool designed to collect public product data
from AliExpress on a large scale. This short tutorial will show you how
to scrape AliExpress with Oxylabs’ Scraper API.How it worksYou can extract AliExpress data by sending a request to our API with
URLs you want to scrape. Our service will send back the HTML of any
AliExpress page.Python code exampleThis sample showcases how to make an API request and retrieve the HTML
of AliExpress search results for the keyword “laptop”:importrequestsfrompprintimportpprint# Structure payload.payload={'source':'universal_ecommerce','url':'https://www.aliexpress.com/w/wholesale-laptop.html?catId=0&initiative_id=SB_20230907055110&SearchText=laptop&spm=a2g0o.best.1000002.0','user_agent_type':'desktop','render':'html','geo_location':'Germany'}# Get response.response=requests.request('POST','https://realtime.oxylabs.io/v1/queries',auth=('USERNAME','PASSWORD'),#Your credentials go herejson=payload,)# Instead of response with job status and results url, this will return the# JSON response with results.pprint(response.json())See thedocumentationfor more code samples.Output sample{"results":[{"content":"<!doctype html><html lang="en"><head>...</script></body></html>","created_at":"2023-09-07 14:04:18","updated_at":"2023-09-07 14:04:42","page":1,"url":"https://www.aliexpress.com/w/wholesale-laptop.html?catId=0&initiative_id=SB_20230907055110&SearchText=laptop&spm=a2g0o.best.1000002.0","job_id":"7105551359235115009","status_code":200}]}The data harvesting process is significantly easier with Oxylabs’
AliExpress Scraper API. You can collect details such as pricing,
reviews, product information, and other public data. If you have any
questions, you can contact us vialive
chatoremail.
|
aliexpress-sdk
|
AliExpress Seller API SDKPython wrapper of the AliExpress API for sellers.
See the original API documentation at theAli Express Open Platformweb site.How to installpip install aliexpress-sdkor (for pre-release):pipinstallgit+https://github.com/bayborodin/aliexpress-sdkContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Before sending a pull request, please make sure that all tests pass and that the linter has no comments on your code.LicenseMIT
|
alif
|
hello uncleengineer
|
alife
|
No description available on PyPI.
|
alifedata-phyloinformatics-convert
|
alifedata-phyloinformatics-convert helps apply traditional phyloinformatics software to alife standardized dataFree software: MIT licenseDocumentation:https://alifedata-phyloinformatics-convert.readthedocs.io.UsageUseapc’sRosettaTreeinterface for flexible conversion between phylogenetic data structures and schemas.
First, create aRosettaTreeobject from any supported structure/schemaimportioimportpathlibimportalifedata_phyloinformatics_convertasapcimportanytreeimportBioimportdendropyimportete3aseteimportnetworkximportpandasimportphylotrackpynewickstr="((A,B),(C,D));"forobjin[anytree.AnyNode(),Bio.Phylo.read(io.StringIO(newickstr),"newick"),dendropy.Tree.get(data=newickstr,schema="newick"),ete.Tree(newickstr),networkx.DiGraph(),pandas.DataFrame({"id":[0],"ancestor_list":"[None]"}),# alife standardphylotrackpy.systematics.Systematics(lambdax:x),]:converter=apc.RosettaTree(obj)# from phyloinformatics schema# ... nexml and nexus also supported!converter=apc.RosettaTree.from_newick(newickstr)converter=apc.RosettaTree.from_newick(pathlib.Path("read.newick"))withopen("read.newick","r")asfp:converter=apc.RosettaTree.from_newick(fp)# from alife standard data via Pandasconverter=apc.RosettaTree(pandas.read_csv("read-alifestd.csv"))Then, convert or serialize data# ... converter created as aboveconverter.as_alife# pandas DataFrameconverter.as_biopythonconverter.as_dendropyconverter.as_eteconverter.as_networkxconverter.as_phylotrack# serialization, nexml and nexus schemata also supportedconverter.to_newick()# returns newick stringconverter.to_newick(pathlib.Path("write.newick"))# writes to pathwithopen("write.newick","w")asfp:# writes to file objectconverter.to_newick(fp)# alifestd serializationconverter.as_alife.to_csv("write-alifestd.csv",index=False)Useapc’s functional interface to convert between alife format other libraries’ tree objectsimportalifedata_phyloinformatics_convertasapcimportpandasalife_df=pandas.read_csv('alifedata.csv')# biopythontree=apc.alife_dataframe_tobiopython_tree(alife_df)frame=apc.biopython_tree_to_alife_dataframe(tree)# dendropytree=apc.alife_dataframe_to_dendropy_tree(alife_df)frame=apc.dendropy_tree_to_alife_dataframe(tree)# eteete_tree=apc.alife_dataframe_to_ete_tree(alife_df)frame=apc.ete_tree_to_alife_dataframe(tree)# networkxdigraph=apc.alife_dataframe_to_networkx_digraph(alife_df)frame=apc.networkx_digraph_to_alife_dataframe(digraph)# phylotrackpysystematics=apc.alife_dataframe_to_phylotrack_systematics(alife_df)frame=apc.phylotrack_systematics_to_alife_dataframe(systematics)# partial support is also included for,# - adjacency lists# - anytree trees# - scipy linkage matrices# ... see API documentation for detailsCommand Line InterfaceUseapc’s CLItoalifedatacommand to convert newick, nexml, and nexus data to alife standard phylogenetics dataUsage:alifedata-phyloinformatics-converttoalifedata[OPTIONS]convertstandardalifephylogenydatatophloinformaticsformatOptions:--input-fileFILENAMEphyloinformaticsdatafilepath;defaultstdin--input-schemaTEXTphyloinformaticsdataformatschema;optionsincludenewick,nexml,andnexus[required]--output-fileFILENAMEalifedatafilepath;defaultstdout--output-formatTEXTalifedatafileformat;defaultcsv--suppress-unifurcations/--keep-unifurcationsCompresssequencesofnodeswithsingledescendants--helpShowthismessageandexit.Use thefromalifedatacommand to convert to other formats from alife standard phylogenetics dataUsage:alifedata-phyloinformatics-convertfromalifedata[OPTIONS]convertphloinformaticsdatatostandardalifephylogenyformatOptions:--input-fileFILENAMEalifedatafilepath;defaultstdin--input-formatTEXTalifedatafileformat;defaultcsv--output-fileFILENAMEphyloinformaticsdatafilepath;defaultstdout--output-schemaTEXTphyloinformaticsdataformatschema;optionsincludenewick,nexml,andnexus[required]--suppress-unifurcations/--keep-unifurcationsCompresssequencesofnodeswithsingledescendants--helpShowthismessageandexit.InstallationInstall from PyPipip3installalifedata-phyloinformatics-convertCreditsBuilt using theDendroPylibrary.
This package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
|
alifirstpypi
|
This is the homepage of ALIFIRSTPYPI project.
|
alifunc-http
|
No description available on PyPI.
|
ali-gaussbinom-distributions
|
No description available on PyPI.
|
aligem
|
# AliGEM
|
aligi
|
aligiAliyun Gateway Interface为无服务函数计算作为阿里云 API 后端运行提供转析,并且允许同一个无服务函数既支持 HTTP 触发器,也支持作为 API 网关的后端服务。为什么会有这个库?使用 Flask,Django 等支持标准 WSGI 协议的 Web 框架创建无服务函数时,使用HTTP触发器才能让它们正常运行。但如果想使用无服务函数作为阿里云 API 网关的后端时,则无法直接使用这些函数,只能通过网络调用,这显然是不够高效、并且费钱的。如何安装在项目根目录下执行pip install -t . aligi如何使用以下为一个最小的 Flask 样例fromflaskimportFlaskfromaligiimportWSGIapp=Flask(__name__)@app.route("/")defhello_world():return"Hello, World!"# 阿里云无服务函数的入口handler=WSGI(app)其中app可以是任意一个标准 WSGI Application。在 Django 项目中,它一般在项目的wsgi.py里。参考文档阿里云文档:HTTP 触发器API 网关触发器
|
align
|
ALIGN, a computational tool for multi-level language analysis (optimized for Python 3.10)alignis a Python library for extracting quantitative, reproducible
metrics of multi-level alignment between two speakers in naturalistic
language corpora. The method was introduced in "ALIGN: Analyzing
Linguistic Interactions with Generalizable techNiques" (Duran, Paxton, &
Fusaroli, 2019; Psychological Methods).Installationalignmay be downloaded directly usingpip.To download the stable version released on PyPI:pip install alignTo download directly from our GitHub repo:pip install git+https://github.com/nickduran/align-linguistic-alignment.gitAdditional tools required for somealignoptionsThe Google News pre-trained word2vec vectors (GoogleNews-vectors-negative300.bin)
and the Stanford part-of-speech tagger (stanford-postagger-full-2020-11-17)
are required for some optionalalignparameters but must be downloaded
separately.Google News:https://code.google.com/archive/p/word2vec/(page) orhttps://drive.google.com/file/d/0B7XkCwpI5KDYNlNUTTlSS21pQmM/edit?usp=sharing(direct download)Stanford POS tagger:https://nlp.stanford.edu/software/tagger.shtml#Download(page)
orhttps://nlp.stanford.edu/software/stanford-tagger-4.2.0.zip(direct download)TutorialsWe created Jupyter Notebook tutorials to provide an easily accessible
step-by-step walkthrough on how to usealign. Below are descriptions of the
current tutorials that can be found in theexamplesdirectory within this
repository. If unfamiliar with Jupyter Notebooks, instructions for installing
and running can be found here:http://jupyter.org/install. We recommend installing
Jupyter using Anaconda. Anaconda is a widely-used Python data science platform
that helps streamline workflows. A major advantage is that Anaconda also makes it easy
to set up unique Python environments - which may be necessary to runalignand the tutorials givenalignis currently optimized for Python 3.Jupyter Notebook 1: CHILDESThis tutorial walks users through an analysis of conversations from a
single English corpus from the CHILDES database (MacWhinney,
2000)---specifically, Kuczaj’s Abe corpus (Kuczaj, 1976). We analyze the
last 20 conversations in the corpus in order to explore how ALIGN can be
used to track multi-level linguistic alignment between a parent and child
over time, which may be of interest to developmental language researchers.
Specifically, we explore how alignment between a parent and a child
changes over a brief span of developmental trajectory.Jupyter Notebook 2: Devil's AdvocateThis tutorial walks users throught the analysis reported in (Duran,
Paxton, & Fusaroli, 2019). The corpus consists of 94 written
transcripts of conversations, lasting eight minutes each, collected from
an experimental study of truthful and deceptive communication. The goal
of the study was to examine interpersonal linguistic alignment between
dyads across two conversations where participants either agreed or
disagreed with each other (as a randomly assigned between-dyads condition)
and where one of the conversations involved the truth and the other
deception (as a within-subjects condition).We are in the process of adding more tutorials and would welcome additional
tutorials by interested contributors.AttributionIf you find the package useful, please cite our manuscript:Duran, N., Paxton, A., & Fusaroli, R. (2019). ALIGN: Analyzing
Linguistic Interactions with Generalizable techNiques.Psychological Methods.http://dynamicog.org/papers/Licensing of example dataCHILDESExample corpus "Kuczaj Corpus" by Stan Kuczaj is licensed under a
Creative Commons Attribution-ShareAlike 3.0 Unported License
(https://childes.talkbank.org/access/Eng-NA/Kuczaj.html):Kuczaj, S. (1977). The acquisition of regular and irregular past tense
forms.Journal of Verbal Learning and Verbal Behavior, 16, 589–600.Devil's AdvocateThe complete de-identified dataset of raw conversational transcripts
is hosted on a secure protected-access repository provided by the
Inter-university Consortium for Political and Social Research
(ICPSR). Please click on the link to access:http://dx.doi.org/10.3886/ICPSR37124.v1.
Due to the requirements of our IRB, please note that users interested in
obtaining these data must complete a Restricted Data Use Agreement, specify
the reason for the request, and obtain IRB approval or notice of exemption for their research.Duran, Nicholas, Alexandra Paxton, and Riccardo
Fusaroli. Conversational Transcripts of Truthful and
Deceptive Speech Involving Controversial Topics,
Central California, 2012. ICPSR37124-v1. Ann Arbor,
MI: Inter-university Consortium for Political and
Social Research [distributor], 2018-08-29.
|
align1d
|
If you cannot install this package from pip, please go tohttps://github.com/frostinassiky/gtadto install from source.
Suggest requirement: torch>=1.6.0, cuda>=10.2,GCC >= 4.9
|
align4d
|
User InstructionIntroductionalign4dis a powerful Python package used for aligning text results from Speaker Diarization and Speech Recognition to gold standard transcript, especially when there are overlappings between speakers. This user manual provides a step-by-step guide on how to install, use and troubleshoot the package.MechanismThealign4duses global alignment algorithm that is a multi-sequence variant of Needleman-Wunsch algorithm to align hypothesis (results generated by Speaker Diarization and Speech Recognition models) to reference (usually gold standard transcript, which will be separated into multiple sequence if there are multiple speakers). The alignment happens on the token level. For long sequence thealign4dwill automatically separate the sequence into smaller segments, align them separately by finding the absolute aligned parts (called barriers), and finally assemble them together.Thealign4duses Levenshtein Distance as the measurement of the similarity between tokens while doing alignment. There can be 4 situations between each position of alignment:Fully match. Two tokens are exactly the same (Levenshtein Distance is 0).Partially match. Two tokens are not exactly the same but the Levenshtein Distance between them are within a boundary.Mismatch. Two tokens are different and the Levenshtein Distance between them exceed the boundary.Gap. Only one token is present because it is aligned to a gap (insertion or deletion of tokens).InstallationTo installalign4d, you need to have Python version 3.10 or 3.11. Follow these steps:Open your terminal or command prompt.Type in the following command:pip install align4dWait for the package to download and install.UsageImporting align4dTo usealign4din your Python code, you need to import it. Here's how:fromalign4dimportalignCompileBefore actual alignment, thealign4dis required to compile the c++ source codes distributed along with the package.
To ensure successful compilation, the latest version of compiler that supports c++20 is required.For Windows, install or update to the latest version of Visual Studio with the latest version of Visual C++ (or Visual Studio version >= 17.4.4).For macOS, install or update to the latest version of Xcode with Apple Clang (or Xcode version >= 14.3 with Apple Clang version >= 14.0.3).For Linux, install or update to the latest version of GCC with G++ (or GCC version >= 11.2.0).To compile the c++ source code, use the functionalign.compile():align.compile()At this stage, do not run any alignment related functions introduced in the following sections but just runalign.compile().
Once it is compiled, you don't need to (and should not) run this function again while doing alignment. You do need to rerun thealign.compile()when you switch to a new environment or reinstall the align4d.Aligning Text Resultsalign4dcan align results from Speaker Diarization and Speech Recognition. For simple and straight forward usage, the function can be used like this:aligned_result=align.align(hypothesis,reference)Here's the overview of all parameters of the function:aligned_result=align.align(hypothesis:str|list[str],reference:list[list],partial_bound:int=2,segment_length:int=None,barrier_length:int=None,strip_punctuation:bool=True)Thealign()function takes in 6 parameters, thehypothesisandreferenceare required and the other 4 of them are optional:hypothesis: This is a list of strings or a string containing tokenized text . Each string represents a word that is generated from the Speech Recognition model. It is suggested to remove all the punctuations, escape values, and any other characters that is not in the natural language.hypothesis=["ok","I","am","a","fish","Are","you","Hello","there","How","are","you","ok"]# orhypothesis="ok I am a fish. Are you? Hello there. How are you? ok"reference: This is a nested list of strings containing utterance and speaker labels from the gold standard text. The first string within each secondary list represents the speaker label, the second string represents the utterance. The second string can also be a list of strings where each string is a token. It is suggested to remove all the punctuations, escape values, and any other characters that is not in the natural language.reference=[["A","I am a fish."],["B","okay."],["C","Are you?"],["D","Hello there."],["E","How are you?"]]# orreference=[["A",["I","am","a","fish."]],["B",["okay."]],["C",["Are","you?"]],["D",["Hello","there."]],["E",["How","are","you?"]]]partial_bound: This is an integer that specifies the boundary between partially match and mismatch in terms of the Levenshtein Distance between the two tokens in comparison. This is an optional parameter and the default value is 2.segment_length: This is a integer that specifies the minimum length of each segment in terms of the number of hypothesis tokens. By providingsegment_lengthandbarrier_lengththe program can perform manual segmentation before actual alignment for long sequence based on the provided parameters.Ifsegment_lengthandbarrier_lengthare not provided and the hypothesis length in terms of tokens is over 100, the program will automatically search and use the optimalsegment_lengthbetween 30 and 120Ifsegment_lengthandbarrier_lengthare not provided and the hypothesis length in terms of tokens is lower than 100, no segmentation will be performed.Ifsegment_lengthandbarrier_lengthare provided and both are integers less than or equal to 0, no segmentation will be performed.It is strongly suggested to perform auto or manual segmentation when the input sequence are long otherwise the alignment may fail because of RAM space limit.It is important that thesegment_lengthandbarrier_lengthneed to be provided together to perform manual segmentation otherwise an Exception will be raised.Exception:Segmentlengthorbarrierlengthparameterincorrectormissing.barrier_length: This is an integer that specifies the length of parts in terms of number of tokens used to detect the absolute aligned parts. This is an optional parameter and the default value is 6 if the parameter is not specified. By providingsegment_lengthandbarrier_lengththe program can perform manual segmentation before actual alignment for long sequence based on the provided parameters.It is important that thesegment_lengthandbarrier_lengthneed to be provided together to perform manual segmentation otherwise an Exception will be raised.Exception:Segmentlengthorbarrierlengthparameterincorrectormissing.strip_punctuation: This is a boolean that specifies if thealign4dwill strip all punctuation in the hypothesis and reference to provide more accurate alignment result or not. The default is set toTrueand the output will provide alignment with the original punctuation.Thealign()function returns a dictionary containing the aligned results. The hypothesis will be the list of strings (tokens) as the value for the key “hypothesis”. The reference will be separated into multiple sequences according to the provided speaker label, where each sequence will be a list of strings (tokens) as the value for the key of their speaker labels. All the reference sequences will be contained in a secondary dictionary as the value for the key “reference” in the primary dictionary. In each list, each token is aligned to the positions that have the same index and the gap is denoted as “” (empty string). If there is punctuation in the input, the punctuation will be preserved in the output.importjsonhypothesis="ok I am a fish. Are you? Hello there. How are you? ok"reference=[["A","I am a fish. "],["B","okay. "],["C","Are you? "],["D","Hello there. "],["E","How are you? "]]align_result=align.align(hypothesis,reference)print(json.dumps(output,indent=4))Sample output fromalign():# content in align_result{"hypothesis":['ok','I','am','a','fish.','Are','you?','Hello','there.','How','are','you?','ok'],"reference":{"A":['','I','am','a','fish.','','','','','','','',''],"B":['okay.','','','','','','','','','','','',''],"C":['','','','','','Are','you?','','','','','',''],"D":['','','','','','','','Hello','there.','','','',''],"E":['','','','','','','','','','How','are','you?','']}}Retrieve token match resultBased on the alignment result, this tool provide function to retrieve the matching result (fully match, partially match, mismatch, gap) for each token. Usetoken_match()to retrieve the token level matching result.The criterion for determining the matching result are the following (also mentioned in theMechanism):fully match: Levenshtein Distance = 0partially match: Levenshtein Distance ≤ boundary (default to be 2)mismatch: Levenshtein Distance > boundary (default to be 2)gap: aligned to a gapThetoken_match()requires 3 parameter, thealign_resultwhich is the direct return value from the previous three alignment functions, an optional parameterpartial_boundwhich must be the same as thepartial_boundused inalign()function (default to be 2), and an optional parameterstrip_punctuationwhich must be the same as thestrip_punctuationused inalign()function (default to be True).hypothesis="ok I am a fish. Are you? Hello there. How are you? ok"reference=[["A","I am a fish. "],["B","okay. "],["C","Are you? "],["D","Hello there. "],["E","How are you? "]]align_result=align.align(hypothesis,reference)token_match_result=align.token_match(align_result)print(token_match_result)The return value is a list of strings that shows the token matching result and can either be fully match, partially match, mismatch, or gap.# possible output for get_token_match_result()['mismatch','fully match','fully match','fully match','fully match','fully match','fully match','fully match','fully match','fully match','fully match','fully match','gap']Retrieve mapping from reference to hypothesisBased on the alignment result, this tool provide function to retrieve the mapping from each token in the reference sequences to the hypothesis sequence. Each index shows the relative position (index) in the hypothesis sequence of the non-gap token (fully match, partially match, or mismatch) from the separated reference sequences. If the index is -1, it means that the current token does not aligned to any token in the hypothesis (align to a gap).To achieve this, use functionalign_indices(). This function requires 2 parameters, thealign_resultwhich is the direct return value from the previousalign()functionand an optional parameterstrip_punctuationwhich must be the same as thestrip_punctuationused inalign()function (default to be True).hypothesis="ok I am a fish. Are you? Hello there. How are you? ok"reference=[["A","I am a fish. "],["B","okay. "],["C","Are you? "],["D","Hello there. "],["E","How are you? "]]align_result=align.align(hypothesis,reference)align_indices=align.align_indices(align_result)print(align_indices)The return value is a dictionary containing list of integers that shows the mapping between tokens from separated reference to hypothesis. The integers are the indices of the tokens in reference sequence map to the hypothesis sequence (for example, the first token in sequence “C” is mapped to the token in hypothesis with index 5).# possible output{'A':[1,2,3,4],'B':[0],'C':[5,6],'D':[7,8],'E':[9,10,11]}TroubleshootingThis package currently only supports Windows 10/11 x86_64, Linux x86_64 (tested with Ubuntu 22.04), and macOS (M-series processor or Intel processor).If you encounter any issues while usingalign4d, try the following:Make sure you have installed Python version 3.10 or 3.11.For compilation, make sure you have the compiler that supports c++20. The compilers can be acquired by installing:For Windows, install or update to the latest version of Visual Studio with the latest version of Visual C++ (or Visual Studio version >= 17.4.4).For macOS, install or update to the latest version of Xcode with Apple Clang (or Xcode version >= 14.3 with Apple Clang version >= 14.0.3).For Linux, install or update to the latest version of GCC with G++ (or GCC version >= 11.2.0).If you have permission or access issues during compilation, please manually delete all compiled objects (ended with .so, .pyd, .dll) in the package under the same directory of align.py.Do not runalign.compile()with other align functions (align(),token_match(),align_indices()) at the same time.Make sure you have installed the latest version ofalign4d.Check the input data to make sure it is in the correct format.All the input strings must be encoded in the utf-8 format.Characters that are within the utf-8 format but not part of the natural language may affect the alignment performance. Remove them unless you are clear about the usages about these characters.
|
alignai
|
Align AI Python SDKThis is the official server-side Python SDK for Align AI. This library allows you to easily send your data to Align AI.Visit thefull documentationto see the detailed usage.InstallationInstall the Python SDK with pip:pipinstallalignaiContributionIf you have any issues with the SDK, feel free to open Github issues and we'll get to it as soon as possible.We welcome your contributions and suggestions!
|
alignak
|
===================================Presentation of the Alignak project===================================*Alignak - modern Nagios compatible monitoring framework*.. image:: https://api.travis-ci.org/Alignak-monitoring/alignak.svg?branch=develop:target: https://travis-ci.org/Alignak-monitoring/alignak:alt: Develop branch build status.. image:: https://landscape.io/github/Alignak-monitoring/alignak/develop/landscape.svg?style=flat:target: https://landscape.io/github/Alignak-monitoring/alignak/develop:alt: Development code static analysis.. image:: https://coveralls.io/repos/Alignak-monitoring/alignak/badge.svg?branch=develop:target: https://coveralls.io/r/Alignak-monitoring/alignak:alt: Development code tests coverage.. image:: https://readthedocs.org/projects/alignak-doc/badge/?version=latest:target: http://alignak-doc.readthedocs.org/en/latest:alt: Lastest documentation Status.. image:: https://readthedocs.org/projects/alignak-doc/badge/?version=develop:target: http://alignak-doc.readthedocs.org/en/develop:alt: Development branch documentation Status.. image:: https://img.shields.io/badge/IRC-%23alignak-1e72ff.svg?style=flat:target: http://webchat.freenode.net/?channels=%23alignak:alt: Join the chat #alignak on freenode.net.. image:: https://img.shields.io/badge/License-AGPL%20v3-blue.svg:target: http://www.gnu.org/licenses/agpl-3.0:alt: License AGPL v3Alignak Project---------------`Alignak <http://www.alignak.net>`_ is an open source monitoring framework written in Python under the terms of the `GNU Affero General Public License <http://www.gnu.org/licenses/agpl.txt>`_ .Its main goal is to give users a flexible and complete solution for their monitoring system. Alignak is designed to scale to large environments.The project started in 2015 from a fork of the Shinken project. Since the project creation, we achieved a huge code documentation and cleaning, we tested the application in several environments and we developed some new features.The main idea when developing Alignak is the flexibility which is our definition of framework. We target the following goals:* Easy to install: we will always deliver packages (OS and Python) installation.You can install Alignak with OS packages, Python PIP apckages or *setup.py* directly..* Easy for new users: this documentation should help you to discover Alignak.This documentation shows simple use-cases and helps building more complex configurations.* Easy to migrate from Nagios: Nagios flat-files configuration and plugins will work with Alignak.We try to keep as much as possible an ascending compatibility with former Nagios configuration...* Multi-platform: python is available in a lot of Operating Systems.We try to write generic code to keep this possible. However, Linux and FreeBSD are the most tested OSes so far.As of now, Alignak is tested with Python 2.7, 3.5 and 3.6 versions but will work with Pypy in the future.* UTF-8 compliant: whatever you language, we take care of it.We are testing Alignak I/O with several languages and take care of localization.* Independent from other monitoring solution:Alignak is a framework that can integrate with other applications through standard interfaces.Flexibility first!* Flexible: in an architecture point of view.Alignak may be distributed across several servers, datacenters to suit the monitoring needs and constrints.It is our scalability wish!* Easy to contribute: contribution has to be an easy process.Alignak follow pycodestyle (former pep8), pylint and pep257 coding standards to ease code readability.Step by step help to contribute to the project can be found in :ref:`Contributing <contributing/index>`This is basically what Alignak is made of. May be add the *keep it simple* Linux principle and it's perfect.There is nothing we don't want, we consider every features / ideas. Feel free to join `by mail <mailto:[email protected]>`_ or on `the IRC #alignak <http://webchat.freenode.net/?channels=%23alignak>`_ to discuss or ask for more informationDocumentation-------------`Alignak Web Site <http://www.alignak.net>`_ includes much documentation and introduces the Alignak main features, such as the backend, the webui, the tight integration with timeseries databases, ...Alignak project has `an online documentation page <http://alignak-monitoring.github.io/documentation/>`_. We try to have as much documentation as possible and to keep this documentation simple and understandable. For sure the documentation is not yet complete, but you can help us ;)Click on one of the docs badges on this page to browse the documentation.Requirements------------See the requirements file in the repository's rootInstalling Alignak------------------Alignak Deb / Rpm packaging is built thanks to the bintray service. Get the package for your Linux distribution `on our packages repository<https://bintray.com/alignak>`_.See the `installation documentation <https://alignak-doc.readthedocs.org/en/latest/02_installation/index.html>`_ for more information on the different installation possibilities offered by Alignak.
|
alignak_app
|
Alignak desktop applicationShort descriptionAlignak-App is a desktop application, residing in the system tray, for the Alignak framework. It can be installed on any Linux or Windows Dekstop / Server with a graphical interface which can run Python.This application is useful for people with an Alignak installation in their business and who want to keep an eye on their supervision constantly.Features:See Alignak daemons status (if activate in backend), number, states, informations of hosts and servicesBe notified for: problems, actions, changes, daemon states, …View a synthesis view of a host and its services (states, output, checks, …)Acknowledge problems, schedule downtimes on your Hosts / ServicesSpy on hosts to keep an eye onAnd other features to come…App usePyQt5, bindings of Qt application framework.InstallationTo install Alignak-app:Windows Users:# An installer for Windows is available on this repository.
# To keep it free, installer is not signed, so Windows Defender SmartScreen will warn you about that.
# Just click on "More Informations" and on "Execute anyway" to run installer.# You can also generate your own setup. Please, follow the documentation link below.Linux Users:# Alignak Apppip3installalignak_app# First runalignak-app-launcher--start# Run application in current shellalignak-app-launcher--install# Install a daemon file# Once you've installed Alignak-app daemon, just run:alignak-appstartDevelopment (Windows or Linux):# If you want to test development version or a specific version, tags, commit run:gitclonehttps://github.com/Alignak-monitoring-contrib/alignak-appcdalignak-app# If you're under Windows, use "pip" instead of "pip3"pip3install-rrequirements.txtpip3install.-v# Then run "app.py" fileYou can find more help in the documentation below.DocumentationDocumentation for Alignak-app is available onRead The Docs.
You will find everything you need to install and configure the application.To learn more aboutAlignakproject, please visithttp://www.alignak.net/.Release strategyAlignak-app willtryto follow theAlignak-Backendversion.
As of it, take care to install the same minor version on your system to ensure compatibility between all the packages.
e.g.: if your Backend is1.4.x, use Alignak-app1.4.x.Bugs / EnhancementsPlease open any issue or idea on thisrepository.Preview
|
alignak_backend
|
This module is an Alignak REST backendHome-page: http://alignak-backend.readthedocs.orgAuthor: Alignak teamAuthor-email: [email protected]: GNU Affero General Public License, version 3Download-URL: https://github.com/Alignak-monitoring-contrib/alignak-backendProject-URL: Presentation, http://alignak.netProject-URL: Documentation, http://docs.alignak.net/en/latest/Project-URL: Source, https://github.com/alignak-monitoring-contrib/alignak-backend/Project-URL: Tracker, https://github.com/alignak-monitoring-contrib/alignak-backend/issuesProject-URL: Contributions, https://github.com/alignak-monitoring-contrib/Description: Alignak Backend===============*Python Eve REST Backend for Alignak monitoring framework*.. image:: https://travis-ci.org/Alignak-monitoring-contrib/alignak-backend.svg?branch=develop:target: https://travis-ci.org/Alignak-monitoring-contrib/alignak-backend:alt: Develop branch build status.. image:: https://landscape.io/github/Alignak-monitoring-contrib/alignak-backend/develop/landscape.svg?style=flat:target: https://landscape.io/github/Alignak-monitoring-contrib/alignak-backend/develop:alt: Development code static analysis.. image:: https://codecov.io/gh/Alignak-monitoring-contrib/alignak-backend/branch/develop/graph/badge.svg:target: https://codecov.io/gh/Alignak-monitoring-contrib/alignak-backend:alt: Development code coverage.. image:: http://readthedocs.org/projects/alignak-backend/badge/?version=develop:target: http://alignak-backend.readthedocs.io/en/latest/?badge=develop:alt: Development documentation Status.. image:: https://badge.fury.io/py/alignak_backend.svg:target: https://badge.fury.io/py/alignak_backend:alt: Most recent PyPi version.. image:: https://img.shields.io/badge/IRC-%23alignak-1e72ff.svg?style=flat:target: http://webchat.freenode.net/?channels=%23alignak:alt: Join the chat #alignak on freenode.net.. image:: https://img.shields.io/badge/License-AGPL%20v3-blue.svg:target: http://www.gnu.org/licenses/agpl-3.0:alt: License AGPL v3Short description-----------------This package is an Alignak Backend.It is used to:* manage monitoring configuration (hosts, services, contacts, timeperiods...)end user (WebUI, alignak-backend-cli, python/php client, curl command line,...) can get, add, edit monitoring configurations elementsinner templating system to easily create new hosts, services, users, ...Alignak gets this configuration when its arbiter module starts* manage retentionAlignak saves and loads retention information for checks/hosts/services from the backend* manage the monitoring live stateAlignak add/update states for hosts and servicesend user (webui, command line...) can get these information* manage the metrics from the checks performance dataAlignak backend automatically send metrics to Graphite / InfluxDB timeseries databasesAlignak backend automatically creates Grafana panels for hosts / services metricsInstallation------------From Alignak packages repositories~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~More information in the online Alignak backend documentation. Here is only an abstract...Debian::# Alignak DEB stable packagessudo echo deb https://dl.bintray.com/alignak/alignak-deb-stable xenial main | sudo tee -a /etc/apt/sources.list.d/alignak.listsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv D401AB61sudo apt-get updatesudo apt install alignak-backendCentOS::sudo vi /etc/yum.repos.d/alignak-stable.repo:[Alignak-rpm-stable]name=Alignak RPM stable packagesbaseurl=https://dl.bintray.com/alignak/alignak-rpm-stablegpgcheck=0repo_gpgcheck=0enabled=1sudo yum repolistsudo yum install python-alignak-backendFrom PyPI~~~~~~~~~To install the package from PyPI::sudo pip install alignak-backendFrom source files~~~~~~~~~~~~~~~~~To install the package from the source files::git clone https://github.com/Alignak-monitoring-contrib/alignak-backendcd alignak-backendsudo pip install .Documentation-------------The Alignak backend documentation is available on `Read the docs <http://alignak-backend.readthedocs.io/en/latest/?badge=develop>`_ or in the */docs* folder of this repository.To build the doc::cd docspython models_to_rst.pymake clearmake htmlRelease strategy----------------Alignak backend and its *satellites* (backend client, and backend import tools) must all have thesame features level. As of it, take care to install the same minor version on your system toensure compatibility between all the packages. Use 0.4.x version of Backend import and Backendclient with a 0.4.x version of the Backend.Bugs, issues and contributing-----------------------------Please report any issue using the project `issues page <https://github.com/Alignak-monitoring-contrib/alignak-backend/issues>`_.Keywords: python monitoring alignak nagios shinkenPlatform: anyClassifier: Development Status :: 5 - Production/StableClassifier: Environment :: ConsoleClassifier: Intended Audience :: DevelopersClassifier: Intended Audience :: System AdministratorsClassifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)Classifier: Natural Language :: EnglishClassifier: Operating System :: POSIXClassifier: Operating System :: POSIX :: LinuxClassifier: Operating System :: POSIX :: BSD :: FreeBSDClassifier: Topic :: SystemClassifier: Topic :: System :: MonitoringClassifier: Topic :: System :: Networking :: MonitoringClassifier: Programming Language :: PythonClassifier: Programming Language :: Python :: 2Classifier: Programming Language :: Python :: 2.7Classifier: Programming Language :: Python :: 3Classifier: Programming Language :: Python :: 3.5Classifier: Programming Language :: Python :: 3.6Description-Content-Type: text/x-rst
|
alignak_backend_client
|
This module is a Python library used for the REST API of the Alignak backendHome-page: https://github.com/Alignak-monitoring-contrib/alignak-backend-clientAuthor: Alignak teamAuthor-email: [email protected]: GNU Affero General Public License, version 3Description: Alignak Backend client======================*Python client library and CLI for Alignak Backend*.. image:: https://travis-ci.org/Alignak-monitoring-contrib/alignak-backend-client.svg?branch=develop:target: https://travis-ci.org/Alignak-monitoring-contrib/alignak-backend-client:alt: Develop branch build status.. image:: https://landscape.io/github/Alignak-monitoring-contrib/alignak-backend-client/develop/landscape.svg?style=flat:target: https://landscape.io/github/Alignak-monitoring-contrib/alignak-backend-client/develop:alt: Development code static analysis.. image:: https://coveralls.io/repos/Alignak-monitoring-contrib/alignak-backend-client/badge.svg?branch=develop&service=github:target: https://coveralls.io/github/Alignak-monitoring-contrib/alignak-backend-client?branch=develop:alt: Development code coverage.. image:: https://readthedocs.org/projects/alignak-backend-client/badge/?version=latest:target: http://alignak-backend-client.readthedocs.org/en/latest/?badge=latest:alt: Lastest documentation Status.. image:: https://readthedocs.org/projects/alignak-backend-client/badge/?version=develop:target: http://alignak-backend-client.readthedocs.org/en/develop/?badge=develop:alt: Development documentation Status.. image:: https://badge.fury.io/py/alignak_backend.svg:target: https://badge.fury.io/py/alignak_backend_client:alt: Most recent PyPi version.. image:: https://img.shields.io/badge/IRC-%23alignak-1e72ff.svg?style=flat:target: http://webchat.freenode.net/?channels=%23alignak:alt: Join the chat #alignak on freenode.net.. image:: https://img.shields.io/badge/License-AGPL%20v3-blue.svg:target: http://www.gnu.org/licenses/agpl-3.0:alt: License AGPL v3Documentation-------------The Backend client class is commented and `an online documentation <http://alignak-backend-client.readthedocs.io/>`_ is automatically built from the source code. Click on this link or on one of the docs badges on this page to browse the documentation.The `Alignak backend documentation <http://alignak-backend.readthedocs.io/>`_ will also be really helpful to you ;)Installation------------From Alignak packages repositories~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~More information in the online Alignak backend documentation. Here is only an abstract...Debian::# Alignak DEB stable packagessudo echo deb https://dl.bintray.com/alignak/alignak-deb-stable xenial main | sudo tee -a /etc/apt/sources.list.d/alignak.listsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv D401AB61sudo apt-get updatesudo apt install alignak-backend-clientCentOS::sudo vi /etc/yum.repos.d/alignak-stable.repo:[Alignak-rpm-stable]name=Alignak RPM stable packagesbaseurl=https://dl.bintray.com/alignak/alignak-rpm-stablegpgcheck=0repo_gpgcheck=0enabled=1sudo yum repolistsudo yum install python-alignak-backend-clientFrom PyPI~~~~~~~~~To install the package from PyPI:::sudo pip install alignak-backend-clientFrom source files~~~~~~~~~~~~~~~~~To install the package from the source files:::git clone https://github.com/Alignak-monitoring-contrib/alignak-backend-clientcd alignak-backend-clientsudo pip install .Release strategy----------------Alignak backend and its *satellites* (backend client, and backend import tools) must all have thesame features level. As of it, take care to install the same minor version on your system toensure compatibility between all the packages. Use 0.4.x version of Backend import and Backendclient with a 0.4.x version of the Backend.Bugs, issues and contributing-----------------------------Contributions to this project are welcome and encouraged ... `issues in the project repository <https://github.com/alignak-monitoring-contrib/alignak-backend-client/issues>`_ are the common way to raise an information.Keywords: alignak monitoring backendPlatform: UNKNOWNClassifier: Development Status :: 5 - Production/StableClassifier: Environment :: ConsoleClassifier: Intended Audience :: DevelopersClassifier: Intended Audience :: System AdministratorsClassifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)Classifier: Natural Language :: EnglishClassifier: Programming Language :: PythonClassifier: Topic :: System :: MonitoringClassifier: Topic :: System :: Systems Administration
|
alignak-backend-import
|
This module contains utility tools to import Nagios-like flat files configuration intoan Alignak REST backend.Home-page: http://alignak-backend-import.readthedocs.io/en/develop/?badge=developAuthor: Frédéric MohierAuthor-email: [email protected]: GNU Affero General Public License, version 3Download-URL: https://github.com/Alignak-monitoring-contrib/alignak-backend-importProject-URL: Presentation, http://alignak.netProject-URL: Documentation, http://docs.alignak.net/en/latest/Project-URL: Source, https://github.com/alignak-monitoring-contrib/alignak-backed/Project-URL: Tracker, https://github.com/alignak-monitoring-contrib/alignak-backend/issuesProject-URL: Contributions, https://github.com/alignak-monitoring-contrib/Description: Alignak Backend import======================*Import flat files Nagios-like configuration into the Alignak backend*.. image:: https://travis-ci.org/Alignak-monitoring-contrib/alignak-backend-import.svg?branch=develop:target: https://travis-ci.org/Alignak-monitoring-contrib/alignak-backend-import:alt: Develop branch build status.. image:: https://readthedocs.org/projects/alignak-backend-import/badge/?version=latest:target: http://alignak-backend-import.readthedocs.org/en/latest/?badge=latest:alt: Latest documentation Status.. image:: https://readthedocs.org/projects/alignak-backend-import/badge/?version=develop:target: http://alignak-backend-import.readthedocs.org/en/develop/?badge=develop:alt: Development documentation Status.. image:: https://badge.fury.io/py/alignak-backend-import.svg:target: https://badge.fury.io/py/alignak-backend-import:alt: Last PyPi version.. image:: https://img.shields.io/badge/License-AGPL%20v3-blue.svg:target: http://www.gnu.org/licenses/agpl-3.0:alt: License AGPL v3Short description-----------------This package contains an utility tool `alignak-backend-import` that allows to import a Nagios-like flat files monitoring configuration into an Alignak Backend.Release strategy----------------Alignak backend and its *satellites* (backend client, and backend import tools) must all have the same features level. As of it, take care to install the same minor version on your system to ensure compatibility between all the packages. Use 0.4.x version of Backend import and Backend client with a 0.4.x version of the Backend.Alignak backend import----------------------The `alignak-backend-import` script may be used to import a Nagios like flat-files configuration into the Alignak backend.The online `documentation<http://alignak-backend-import.readthedocs.io/en/latest/utilities.html#alignak-backend-importation>`_ exaplins all the command line parameters that may be used.A simple usage example for this script::# Assuming that you installed: alignak, alignak-backend and alignak-backend-import# From the root of this repositorycd tests/alignak_cfg_files# Import the test configuration in the Alignak backendalignak-backend-import -d -m ./alignak-demo/alignak-backend-import.cfg# The script imports the configuration and makes some console logs:alignak_backend_import, inserted elements:- 6 command(s)- 3 host(s)- 3 host_template(s)- no hostdependency(s)- no hostescalation(s)- 12 hostgroup(s)- 1 realm(s)- 1 service(s)- 14 service_template(s)- no servicedependency(s)- no serviceescalation(s)- 12 servicegroup(s)- 2 timeperiod(s)- 2 user(s)- 3 usergroup(s)# To confirm, you easily can get an host from the backendalignak-backend-cli -t host get test_host_0# The script dumps the json host on the console and creates a file: */tmp/alignak-object-dump-host-test_host_0.json*{..."active_checks_enabled": true,"address": "127.0.0.1","address6": "","alias": "test_host_0",..."customs": {"_OSLICENSE": "gpl","_OSTYPE": "gnulinux"},...}# Get the list of all imported hosts from the backendalignak-backend-cli --list -t host get# The script dumps the json list of hosts on the console and creates a file: */tmp/alignak-object-list-hosts.json*{..."active_checks_enabled": true,"address": "127.0.0.1","address6": "","alias": "test_host_0",..."customs": {"_OSLICENSE": "gpl","_OSTYPE": "gnulinux"},...}Installation------------From Alignak packages repositories~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~More information in the online Alignak backend documentation. Here is only an abstract...Debian::# Alignak DEB stable packagessudo echo deb https://dl.bintray.com/alignak/alignak-deb-stable xenial main | sudo tee -a /etc/apt/sources.list.d/alignak.listsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv D401AB61sudo apt-get updatesudo apt install python-alignak-backend-importCentOS::sudo vi /etc/yum.repos.d/alignak-stable.repo:[Alignak-rpm-stable]name=Alignak RPM stable packagesbaseurl=https://dl.bintray.com/alignak/alignak-rpm-stablegpgcheck=0repo_gpgcheck=0enabled=1sudo yum repolistsudo yum install python-alignak-backend-import.. note:: for Python 3 version, replace ``python`` with ``python3`` in the packages name.From PyPI~~~~~~~~~To install the package from PyPI::sudo pip install alignak-backend-importFrom source files~~~~~~~~~~~~~~~~~To install the package from the source files::git clone https://github.com/Alignak-monitoring-contrib/alignak-backend-importcd alignak-backend-importsudo pip install .Bugs, issues and contributing-----------------------------Please report any issue using the project `issues page <https://github.com/Alignak-monitoring-contrib/alignak-backend-import/issues>`_.Keywords: alignak monitoring backend import toolPlatform: anyClassifier: Development Status :: 5 - Production/StableClassifier: Environment :: ConsoleClassifier: Intended Audience :: DevelopersClassifier: Intended Audience :: System AdministratorsClassifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)Classifier: Natural Language :: EnglishClassifier: Operating System :: POSIXClassifier: Operating System :: POSIX :: LinuxClassifier: Operating System :: POSIX :: BSD :: FreeBSDClassifier: Topic :: SystemClassifier: Topic :: System :: MonitoringClassifier: Topic :: System :: Networking :: MonitoringClassifier: Programming Language :: PythonClassifier: Programming Language :: Python :: 2Classifier: Programming Language :: Python :: 2.7Classifier: Programming Language :: Python :: 3Classifier: Programming Language :: Python :: 3.5Classifier: Programming Language :: Python :: 3.6Description-Content-Type: text/x-rst
|
alignak-checks-alignak
|
Checks pack for monitoring Alignak daemons with the Nagios monitoring check_tcpNote:this check pack is only an example for checking Alignak daemons using the Nagios check_tcp command. Please feel free to comment or suggest improvements :)InstallationThe installation of this checks pack will copy some configuration files in the Alignak default configuration directory (eg./usr/local/share/alignak/etc). The copied files are located in the default sub-directory used for the packs (eg.arbiter/packs).From PyPITo install the package from PyPI:sudo pip install alignak-checks-alignakFrom source filesTo install the package from the source files:git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-alignak
cd alignak-checks-alignak
sudo pip install .Note:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)DocumentationConfigurationThis checks pack is using thecheck_httpNagios (or Monitoring) plugin that must be installed on the Alignak server running your poller daemon. You may install the common Nagios plugins or thealignak-checks-monitoringpackage (see thecorresponding repo).It is also checking information directly from the Algnak arbiter API endpoints thanks to an embedded script.Alignak configurationFor a standard Alignak host, you simply have to tag the concerned host with the templatealignak.:# An host with all the Alignak daemons
define host{
use alignak
host_name my_alignak
address 127.0.0.1
}For a specific configuration, set the ` _satellites` host variable with the list of your configured daemons:# An host with some specific Alignak daemons
define host{
use alignak
host_name my_alignak
address 127.0.0.1
# Default satellites is one instance of each type
# Service generator variable:
# - $(type)
# - $(unique name)
# - $(port)
_satellites arbiter-master$(arbiter)$$(arbiter-master)$$(10000)$,\
scheduler-master$(scheduler)$$(scheduler-master)$$(10001)$,\
scheduler-second$(scheduler)$$(scheduler-second)$$(20001)$,\
scheduler-third$(scheduler)$$(scheduler-third)$$(30001)$,\
reactionner-master$(reactionner)$$(reactionner-master)$$(10002)$,\
poller-master$(poller)$$(poller-master)$$(10003)$,\
broker-master$(broker)$$(broker-master)$$(10004)$,\
receiver-master$(receiver)$$(receiver-master)$$(1005)$
_ALIGNAK_ENDPOINT http://127.0.0.1:10000
}When using the alignak backend, use thesetup.shscript provided in thejson/elasticsearchdirectory to include all the package information into your backend# Backend configuration
$ json/alignak/setup.sh -b http://127.0.0.1:5000 -u admin -p adminNotethat this command line is executed when installing the package frompip. If your backend is not set locally, you can specify its address thanks to the-bcommand line parameter.Bugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak-checks-elasticsearch
|
Checks pack for monitoring Elasticsearch with the Nagios monitoring check_tcpNote:this check pack is only an example for checking elasticsearch using the Nagios check_tcp command. Please feel free to comment or suggest improvements :)This package uses thecheck_elasticsearchscript fromthis project. A version of the script is included to make installation easier but you may refresh when installing…InstallationThe installation of this checks pack will copy some configuration files in the Alignak default configuration directory (eg./usr/local/etc/alignak). The copied files are located in the default sub-directory used for the packs (eg.arbiter/packs).From PyPITo install the package from PyPI:sudo pip install alignak-checks-elasticsearchFrom source filesTo install the package from the source files:git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-elasticsearch
cd alignak-checks-elasticsearch
sudo pip install .Note:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)DocumentationConfigurationThis checks pack is using thecheck_tcpNagios (or Monitoring) plugin that must be installed on the Alignak server running your poller daemon. You may install thealignak-checks-monitoringpackage (see thecorresponding repo).Alignak configurationFor a Linux monitored host, you simply have to tag the concerned host with the templateelasticsearch.# An host with an elasticsearch instance running
define host{
use elasticsearch
host_name my_es
address 127.0.0.1
}When using the alignak backend, use thesetup.shscript provided in thejson/elasticsearchdirectory to include all the package information into your backend# Backend configuration
$ json/elasticsearch/setup.sh -b http://127.0.0.1:5000 -u admin -p adminNotethat this command line is executed when installing the package frompip. If your backend is not set locally, you can specify its address thanks to the-bcommand line parameter.Bugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak_checks_EXAMPLE
|
Alignak checks package example==================================This project is an example and a how-to build a checks pack for Alignak monitoring framework.Packaging----------------------------------------Repositories~~~~~~~~~~~~~~~~~~~~~~~All Alignak packs are stored in their own repository in the `Alignak monitoring contrib`_ Github organization.Design and principles~~~~~~~~~~~~~~~~~~~~~~~Each pack aims to provide all necessary elements in the Alignak configuration to monitor hosts and/or services.Each pack include the checks commands definitions, services templates, hosts templates, ...It is even possible to include the monitoring plugins that will be run by Alignak to check an host/service.Usually, the packs are only made of configuration files using the most common monitoring plugins available from the Nagios community.The pack files are to be made available in the monitoring objects configuration directory and provide configuration utilities for the end-user:* hosts templates: the host "use" the pack features* services templates: the service "use" the pack features* ...The proposed structure to build a pack:* all the checks packs are named as ``alignak_checks_EXAMPLE``* the ``EXAMPLE`` repository is named as ``alignak-checks-EXAMPLE``* the ``EXAMPLE`` repository includes the following files:* README.rst* LICENCE (optional)* AUTHORS (optional)* MANIFEST.in* setup.py* the ``EXAMPLE`` repository includes an ``alignak_checks_EXAMPLE`` directory containing the pack configuration files* the files in ``alignak_checks_EXAMPLE`` directory will be copied to the Alignak configuration* the files in ``alignak_checks_EXAMPLE/plugins`` directory will be copied to the Alignak plugins directory* the files in ``alignak_checks_EXAMPLE/etc`` directory will be copied to the Alignak etc directoryYou are allowed to declare variables in the packs files. Thos variables will be valued after pack installation.All the files which name end with ``.parse`` will be parsed after installation to update their content to the Alignak installation paths.The searched patterns are:* $ETC: will be replaced with the Alignak configuration files path (*/etc/alignak*)* $VAR: will be replaced with the Alignak lib files path (*/var/lib/alignak*)* $RUN: will be replaced with the Alignak run files path (*/var/run/alignak*)* $BIN: will be replaced with the Alignak log files path (*/usr/bin*)* $LOG: will be replaced with the Alignak log files path (*/var/log/alignak*)* $ALIGNAKUSER: will be replaced with the Alignak user account name (*alignak*)* $ALIGNAKGROUP: will be replaced with the Alignak group name (*alignak*)**Note**: the replacement is based on Python Template strings. As of it, $ETC is the simplest form and may be replaced with ${ETC} if necessary.Repository example~~~~~~~~~~~~~~~~~~~~~~~Repository directories and files example:::README.rstLICENCEAUTHORSMANIFEST.insetup.pyalignak_checks_EXAMPLE/etc/test.cfgplugins/sub/plugin.confplugin.pytemplates.cfgservices.cfgcommands.cfgThe content of the directory ``alignak_checks_EXAMPLE`` (including sub directories and except *etc* and *plugins*) will be copied to */var/lib/alignak/libexec*.The content of the directory ``alignak_checks_EXAMPLE/plugins`` (including sub directories) will be copied to */var/lib/alignak/libexec*.The content of the directory ``alignak_checks_EXAMPLE/etc`` (including sub directories) will be copied to */etc/alignak*.Building~~~~~~~~~~~~~~~~~~~~~~~To build a new package EXAMPLE2:* create a new ``alignak-checks-EXAMPLE2`` repository which is a copy of this repository* rename the ``alignak_checks_EXAMPLE`` directory to ``alignak_checks_EXAMPLE2``* update the ``MANIFEST.in`` file* search and replace ``EXAMPLE`` with ``EXAMPLE2`` in the ``MANIFEST.in`` file* update the ``README.rst`` file* remove this section **Packaging*** search and replace ``EXAMPLE`` with ``EXAMPLE2``* complete the **Documentation** chapter* update the ``alignak_checks_EXAMPLE2/__init.py__`` file with all the package information* ``__checks_type__`` will be used to complete the keywords in PyPI and as the sub-directory to store the pack's files* the file docstring will be used as the package description in PyPI* update the ``setup.py`` file* search and replace ``EXAMPLE`` with ``EXAMPLE2``* ``setup.py`` should not be modified for most of the packs ... if necessary, do it with much care!And that's it!Then, to build and make your package available to the community, you must use the standard Python setuptools:* run ``setup.py register`` to register the new package near PyPI* run ``setup.py sdist`` to build the package* run ``setup.py develop`` to make the package installed locally (development mode)* run ``setup.py develop --uninstall`` to remove the development mode* run ``setup.py install --dry-run`` to test the package installation (checks which and where the files are installed)When your package is ready and functional:* run ``setup.py sdist upload`` to upload the package to `PyPI repository`_.**Note**: every time you upload a package to PyPI you will need to change the package version in the ``alignak_checks_EXAMPLE2/__init.py__`` file.Installation----------------------------------------The pack configuration files are to be copied to the monitoring objects configuration directory. The most suitable location is the *arbiter_cfg/objects/packs/* directory in the main alignak configuration directory.**Note**: The main Alignak configuration directory is usually */usr/local/etc/alignak* or */etc/alignak* but it may depend upon your system and/or your installation.The pack plugins (if any ...) are to be copied to the executable libraries directories.**Note**: The Alignak librairies directory is usually */usr/local/libexec/alignak* or */var/lib/alignak* but it may depend upon your system and/or your installation.From PyPI~~~~~~~~~~~~~~~~~~~~~~~To install the package from PyPI:::pip install alignak-checks-EXAMPLEFrom source files~~~~~~~~~~~~~~~~~~~~~~~To install the package from the source files:::git clone https://github.com/Alignak-monitoring/alignak-checks-EXAMPLEcd alignak-checks-EXAMPLEmkdir /usr/local/etc/alignak/arbiter_cfg/objects/packs/EXAMPLE# Copy configuration filescp -R alignak_checks_EXAMPLE/*.cfg /usr/local/etc/alignak/arbiter_cfg/objects/packs/EXAMPLE# Copy plugin filescp -R alignak_checks_EXAMPLE/plugins/*.py /usr/local/libexec/alignakDocumentation----------------------------------------To be completedBugs, issues and contributing----------------------------------------Contributions to this project are welcome and encouraged ... issues in the project repository are the common way to raise an information.License----------------------------------------Alignak Pack EXAMPLE is available under the `GPL version 3 license`_... _GPL version 3 license: http://opensource.org/licenses/GPL-3.0.. _Alignak monitoring contrib: https://github.com/Alignak-monitoring-contrib.. _PyPI repository: <https://pypi.python.org/pypi>
|
alignak_checks_glances
|
Alignak checks package for Glances==================================Checks pack for monitoring hosts with Glances (tests repository)Installation----------------------------------------The pack configuration files are to be copied to the monitoring objects configuration directory. The most suitable location is the *arbiter_cfg/objects/packs/* directory in the main alignak configuration directory.**Note**: The main Alignak configuration directory is usually */usr/local/etc/alignak* or */etc/alignak* but it may depend upon your system and/or your installation.The pack plugins (if any ...) are to be copied to the executable libraries directories.**Note**: The Alignak librairies directory is usually */usr/local/libexec/alignak* or */var/lib/alignak* but it may depend upon your system and/or your installation.From PyPI~~~~~~~~~~~~~~~~~~~~~~~To install the package from PyPI:::pip install alignak-checks-glancesFrom source files~~~~~~~~~~~~~~~~~~~~~~~To install the package from the source files:::git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-glancescd alignak-checks-glancesmkdir /usr/local/etc/alignak/arbiter_cfg/objects/packs/glances# Copy configuration filescp -R alignak_checks_glances/*.cfg /usr/local/etc/alignak/arbiter_cfg/objects/packs/glances# Copy plugin filescp -R alignak_checks_glances/plugins/*.py /usr/local/libexec/alignakDocumentation----------------------------------------To be completedBugs, issues and contributing----------------------------------------Contributions to this project are welcome and encouraged ... issues in the project repository are the common way to raise an information.License----------------------------------------Alignak Pack EXAMPLE is available under the `GPL version 3 license`_... _GPL version 3 license: http://opensource.org/licenses/GPL-3.0
|
alignak-checks-glpi
|
Checks pack for monitoring Glpi with the some specific scriptsNote:this check pack is only an example for checking glpi using the Nagios check_tcp command. Please feel free to comment or suggest improvements :)InstallationThe installation of this checks pack will copy some configuration files in the Alignak default configuration directory (eg./usr/local/etc/alignak). The copied files are located in the default sub-directory used for the packs (eg.arbiter/packs).From PyPITo install the package from PyPI:sudo pip install alignak-checks-glpiFrom source filesTo install the package from the source files:git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-glpi
cd alignak-checks-glpi
sudo pip install .Note:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)DocumentationConfigurationThis checks pack is using thecheck_tcpNagios (or Monitoring) plugin that must be installed on the Alignak server running your poller daemon. You may install thealignak-checks-monitoringpackage (see thecorresponding repo).Alignak configurationFor a Linux monitored host, you simply have to tag the concerned host with the templateglpi.# An host with an glpi instance running
define host{
use glpi
host_name my_glpi
address 127.0.0.1
}When using the alignak backend, use thesetup.shscript provided in thejson/glpidirectory to include all the package information into your backend# Backend configuration
$ json/glpi/setup.sh -b http://127.0.0.1:5000 -u admin -p adminNotethat this command line is executed when installing the package frompip. If your backend is not set locally, you can specify its address thanks to the-bcommand line parameter.Bugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak-checks-graphite
|
Checks pack for monitoring Graphite with the monitoring package (only TCP checks)Note:this check pack is only an example for checking graphite using the Nagios check_tcp command. Please feel free to comment or suggest improvements :)This package uses thecheck_graphite_statusscript fromthis project. A version of the script is included to make installation easier but you may refresh when installing…InstallationThe installation of this checks pack will copy some configuration files in the Alignak default configuration directory (eg./usr/local/etc/alignak). The copied files are located in the default sub-directory used for the packs (eg.arbiter/packs).Depending upon your OS installation you may need to install some PERL dependencies:sudo cpan install LWPFrom PyPITo install the package from PyPI:sudo pip install alignak-checks-graphiteFrom source filesTo install the package from the source files:git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-graphite
cd alignak-checks-graphite
sudo pip install .Note:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)DocumentationConfigurationThis checks pack is using thecheck_tcpNagios (or Monitoring) plugin that must be installed on the Alignak server running your poller daemon. You may install thealignak-checks-monitoringpackage (see thecorresponding repo).Alignak configurationFor a Linux monitored host, you simply have to tag the concerned host with the templategraphite.# An host with an graphite instance running
define host{
use graphite
host_name my_es
address 127.0.0.1
}When using the alignak backend, use thesetup.shscript provided in thejson/graphitedirectory to include all the package information into your backend# Backend configuration
$ json/graphite/setup.sh -b http://127.0.0.1:5000 -u admin -p adminNotethat this command line is executed when installing the package frompip. If your backend is not set locally, you can specify its address thanks to the-bcommand line parameter.Bugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak_checks_linux_nrpe
|
Alignak checks package for Unix/Linux NRPE checked hosts/services=================================================================*Checks pack for monitoring Unix/Linux hosts with NRPE active checks*.. image:: https://badge.fury.io/py/alignak_checks_linux_nrpe.svg:target: https://badge.fury.io/py/alignak-checks-linux-nrpe:alt: Most recent PyPi version.. image:: https://img.shields.io/badge/IRC-%23alignak-1e72ff.svg?style=flat:target: http://webchat.freenode.net/?channels=%23alignak:alt: Join the chat #alignak on freenode.net.. image:: https://img.shields.io/badge/License-AGPL%20v3-blue.svg:target: http://www.gnu.org/licenses/agpl-3.0:alt: License AGPL v3Installation------------The installation of this checks pack will copy some configuration files in the Alignak default configuration directory (eg. */usr/local/etc/alignak*). The copied files are located in the default sub-directory used for the packs (eg. *arbiter/packs*).From PyPI~~~~~~~~~To install the package from PyPI:::sudo pip install alignak-checks-linux-nrpeFrom source files~~~~~~~~~~~~~~~~~To install the package from the source files:::git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-linux-nrpecd alignak-checks-nrpesudo pip install .**Note:** *using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)*Documentation-------------Configuration~~~~~~~~~~~~~This checks pack is using the `check_nrpe` Nagios plugin that must be installed on the Alignak server running your poller daemon.For Unix (FreeBSD), you can simply install the NRPE plugin:::# Simple NRPEpkg install nrpe# NRPE with SSLpkg install nrpe-sslFor Linux distros, install the Nagios ``check_nrpe`` plugin from your system repository:::# Install local NRPE pluginsudo apt-get install nagios-nrpe-plugin# Note: This may install all the Nagios stuff on your machine...After installation, the plugins are commonly installed in the */usr/local/libexec/nagios* directory.The */usr/local/etc/alignak/arbiter/packs/resource.d/nrpe.cfg* file defines a global macrothat contains the NRPE check plugin installation path. You must edit this file to update the default path that is defined to the alignak ``$NAGIOSPLUGINSDIR$`` (defined in alignak default configuration).::#-- NRPE check plugin installation directory# Default is to use the Alignak plugins directory$NRPE_PLUGINS_DIR$=$NAGIOSPLUGINSDIR$#--**Note:** the default value for ``$NAGIOSPLUGINSDIR$`` is set as */usr/lib/nagios/plugins* which is the common installation directory used by the Nagios plugins.Prepare monitored hosts~~~~~~~~~~~~~~~~~~~~~~~Some operations are necessary on the monitored hosts if NRPE remote access is not yet activated.::# Install local NRPE serversu -apt-get updateapt-get install nagios-nrpe-serverapt-get install nagios-plugins# Allow Alignak as a remote hostvi /etc/nagios/nrpe.cfg=>allowed_hosts = X.X.X.X# Restart NRPE daemon/etc/init.d/nagios-nrpe-server startTest remote access with the plugins files:::/usr/local/var/libexec/alignak/check_nrpe -H 127.0.0.1 -t 9 -u -c check_load**Note**: This configuration is the default Nagios NRPE daemon configuration. As such it does not allow to define arguments in the NRPE commands and, as of it, the warning / critical threshold are defined on the server side.Alignak configuration~~~~~~~~~~~~~~~~~~~~~You simply have to tag the concerned hosts with the template ``linux-nrpe``.::define host{use linux-nrpehost_name linux_nrpeaddress 127.0.0.1}The main ``linux-nrpe`` template only declares the default NRPE commands configured on the server.You can easily adapt the configuration defined in the ``services.cfg`` and ``commands.cfg.parse`` files.Bugs, issues and contributing-----------------------------Contributions to this project are welcome and encouraged ... `issues in the project repository <https://github.com/alignak-monitoring-contrib/alignak-checks-linux-nrpe/issues>`_ are the common way to raise an information.
|
alignak-checks-mongodb
|
Checks pack for monitoring MongoDB with the check_mongodb python scriptNote:this check pack is only an example for checking MongoDB using the Nagios check_tcp command. Please feel free to comment or suggest improvements :)This package uses thecheck_mongodb.pyscript fromthis project. A version of the script is included to make installation easier but you may refresh when installing…InstallationThe installation of this checks pack will copy some configuration files in the Alignak default configuration directory (eg./usr/local/etc/alignak). The copied files are located in the default sub-directory used for the packs (eg.arbiter/packs).From PyPITo install the package from PyPI:sudo pip install alignak-checks-mongodbFrom source filesTo install the package from the source files:git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-mongodb
cd alignak-checks-mongodb
sudo pip install .Note:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)DocumentationConfigurationThis checks pack is using thecheck_tcpNagios (or Monitoring) plugin that must be installed on the Alignak server running your poller daemon. You may install thealignak-checks-monitoringpackage (see thecorresponding repo).Alignak configurationFor a Linux monitored host, you simply have to tag the concerned host with the templateMongoDB.:# An host with a MongoDB instance running
define host{
use mongodb
host_name my_es
address 127.0.0.1
}When using the alignak backend, use thesetup.shscript provided in thejson/MongoDBdirectory to include all the package information into your backend:# Backend configuration
$ json/mongodb/setup.sh -b http://127.0.0.1:5000 -u admin -p adminNotethat this command line is executed when installing the package frompip. If your backend is not set locally, you can specify its address thanks to the-bcommand line parameter.Bugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak_checks_monitoring
|
Checks pack for checking a lot of services: Dns, Http, Dhcp, …This checks pack is based upon the check plugins of theMonitoring Plugins Project.This project is a bundle of around 50 standard plugins for monitoring applications. Some plugins allow to monitor local system metrics, others use various network protocols for remote checks.Our bundle was previously known as the “official” Nagios Plugins package.The new name reflects both the success of the straightforward plugin interface originally inventedby the Nagios folks, and the popularity of our package, as the plugins are now used with various other monitoring products as well.InstallationThe pack configuration files are to be copied to the monitoring objects configuration directory. The most suitable location is thearbiter/packs/directory in the main alignak configuration directory.Note: The main Alignak configuration directory is usually/usr/local/share/alignak/etcor/usr/local/etc/alignakor/etc/alignakbut it may depend upon your system and/or your installation.The pack plugins (if any …) are to be copied to the executable libraries directories.Note: The Alignak librairies directory is usually/usr/local/var/libexec/alignakbut it may depend upon your system and/or your installation.From PyPITo install the package from PyPI:sudo pip install alignak-checks-monitoringFrom source filesTo install the package from the source files:git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-monitoring
cd alignak-checks-monitoring
sudo pip install .Note:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)DocumentationConfigurationTo use this checks package, you must first install some external plugins. We recommend that you download and install theMonitoring plugins.Check if it exists a binary package for your OS distribution rather than compiling and installing from source.
Else, the source installation procedure is explainedhere.An abstract:$ wget https://www.monitoring-plugins.org/download/monitoring-plugins-2.X.tar.gz
$ gzip -dc monitoring-plugins-2.X.tar.gz | tar -xf -
$ cd monitoring-plugins-2.X
$ ./configure --prefix /usr/local/libexec/monitoring-plugins
$ make
$ sudo make install
$ sudo make install-root
$ # This for plugins requiring setuid (check_icmp ...)After compilation and installation, the plugins are installed in the/usr/local/libexec/monitoring-plugins/libexecdirectory!The/usr/local/etc/alignak/arbiter/packs/resource.d/monitoring.cfgfile defines a global macro
that contains the monitoring plugins installation path. If you do not install as default, edit
this file to update the path:#-- Monitoring plugins installation directory
$MONITORING_PLUGINS_DIR$=/usr/local/libexec/monitoring-plugins/libexec
#--Many information is available on theproject github repository, espacially in the REQUIREMENTS file.Alignak configurationYou simply have to tag the concerned hosts with the template you are interested in.:define host{
use dns, ftp, http
host_name my_host
address 127.0.0.1
}Each template declares the associated services on the concerned host.
You can easily adapt the configuration defined in thetemplates.cfg,services.cfgandcommands.cfgfiles.Bugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak_checks_mysql
|
Checks pack for monitoring mysql database serverInstallationThe installation of this checks pack will copy some configuration files in the Alignak default configuration directory (eg./usr/local/share/alignak). The copied files are located in the default sub-directory used for the packs (eg.arbiter/packs).From PyPITo install the package from PyPI:sudo pip install alignak-checks-mysqlFrom source filesTo install the package from the source files:git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-mysql
cd alignak-checks-linux-mysql
sudo pip install .Note:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)DocumentationThis checks pack is using the some PERL plugins that are shipped with the checks pack. As such, some more installation and preparation are necessary;)ConfigurationNote: this pack embeds thecheck_mysql_healthscript fromhttp://labs.consol.de/lang/en/nagios/check_mysql_health/.
The embedded version is built from the 2.2.2 version but you may install this script by yourself …We recommand that you download and install your own available from the web site.
An abstract:$ tar xvfz check_mysql_health-2.2.2
$ cd check_mysql_health-2.2.2
$ ./configure --prefix=/usr/local/var/libexec/alignak --with-nagios-user=alignak --with-nagios-group=alignak --with-mymodules-dir=/usr/local/var/libexec/alignak --with-mymodules-dyn-dir=/usr/local/var/libexec/alignak
$ make
$ make installNote: replace/usr/local/var/libexec/alignakaccording to your platform …After compilation and installation, the plugin is installed in the/usr/local/var/libexec/alignakdirectory.Edit the/usr/local/etc/alignak/arbiter/packs/resource.d/mysql.cfgfile and configure the credentials to access to the mysql server.#-- MySQL default credentials
$MYSQLUSER$=root
$MYSQLPASSWORD$=rootInstall PERL dependencies for check_mysql_health pluginYou must install some PERL dependencies for thecheck_mysql_healthscript.Before installing PERL dependencies, you must install the mysql/mariadb client for your operating system.On FreeBSD, you can:pkg install mariadb102-client
cpan install DBI
cpan install DBD::mysqlOn some Linux distros, you can:su -
apt-get install mariadb-client
apt-get install dbi-perl
apt-get install dbd-mysql-perlOr you can use the PERLcpanutility:cpan install DBI
cpan install DBD::mysqlNote: you must have previously installed the mysql client for your operating system :)Alignak configurationYou simply have to tag the concerned hosts with the templatemysql.:define host{
use mysql
host_name my_server
address 127.0.0.1
}Set the MySql connection credentials in theresource.d/mysql.cfgor declare the variables in each host.:#-- MySQL default credentials
$MYSQLUSER$=alignak
$MYSQLPASSWORD$=alignakThe mainmysqltemplate declares macros used to configure the launched checks. The default values of these macros listed hereunder can be overriden in each host configuration.:_MYSQLUSER $MYSQLUSER$
_MYSQLPASSWORD $MYSQLPASSWORD$
_UPTIME_WARN 10:
_UPTIME_CRIT 5:
_CONNECTIONTIME_WARN 1
_CONNECTIONTIME_CRIT 5
_QUERYCACHEHITRATE_WARN 90:
_QUERYCACHEHITRATE_CRIT 80:
_THREADSCONNECTED_WARN 10
_THREADSCONNECTED_CRIT 20
_QCACHEHITRATE_WARN 90:
_QCACHEHITRATE_CRIT 80:
_QCACHELOWMEMPRUNES_WARN 1
_QCACHELOWMEMPRUNES_CRIT 10
_KEYCACHEHITRATE_WARN 99:
_KEYCACHEHITRATE_CRIT 95:
_BUFFERPOOLHITRATE_WARN 99:
_BUFFERPOOLHITRATE_CRIT 95:
_BUFFERPOOLWAITFREE_WARN 1
_BUFFERPOOLWAITFREE_CRIT 10
_LOGWAITS_WARN 1
_LOGWAITS_CRIT 10
_TABLECACHEHITRATE_WARN 99:
_TABLECACHEHITRATE_CRIT 95:
_TABLELOCKCONTENTION_WARN 1
_TABLELOCKCONTENTION_CRIT 2
_INDEXUSAGE_WARN 90:
_INDEXUSAGE_CRIT 80:
_TMPDISKTABLES_WARN 25
_TMPDISKTABLES_CRIT 50
_SLOWQUERIES_WARN 0.1
_SLOWQUERIES_CRIT 1
_LONGRUNNINGPROCS_WARN 10
_LONGRUNNINGPROCS_CRIT 20
_OPENFILES_WARN 80
_OPENFILES_CRIT 95
_THREADCACHEHITRATE_WARN 99:
_THREADCACHEHITRATE_CRIT 95:To set a specific value for an host, declare the same macro in the host definition file.:define host{
use mysql
contact_groups admins
host_name my_host
address 192.168.0.16
# Specific values for this host
_MYSQLUSER root
_MYSQLPASSWORD root_pwd
}Bugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak-checks-nginx
|
Checks pack for monitoring Nginx with the check_nginx scriptNote:this check pack is only an example for checking nginx using the Nagios check_tcp command. Please feel free to comment or suggest improvements :)This package uses thecheck_nginx_statusscript fromthis project. A version of the script is included to make installation easier but you may refresh when installing…InstallationThe installation of this checks pack will copy some configuration files in the Alignak default configuration directory (eg./usr/local/etc/alignak). The copied files are located in the default sub-directory used for the packs (eg.arbiter/packs).Depending upon your OS installation you may need to install some PERL dependencies:sudo cpan install LWPFrom PyPITo install the package from PyPI:sudo pip install alignak-checks-nginxFrom source filesTo install the package from the source files:git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-nginx
cd alignak-checks-nginx
sudo pip install .Note:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)DocumentationConfigurationThis checks pack is using thecheck_tcpNagios (or Monitoring) plugin that must be installed on the Alignak server running your poller daemon. You may install thealignak-checks-monitoringpackage (see thecorresponding repo).Alignak configurationFor a Linux monitored host, you simply have to tag the concerned host with the templatenginx.# An host with an nginx instance running
define host{
use nginx
host_name my_es
address 127.0.0.1
}When using the alignak backend, use thesetup.shscript provided in thejson/nginxdirectory to include all the package information into your backend# Backend configuration
$ json/nginx/setup.sh -b http://127.0.0.1:5000 -u admin -p adminNotethat this command line is executed when installing the package frompip. If your backend is not set locally, you can specify its address thanks to the-bcommand line parameter.Bugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak_checks_nrpe
|
Alignak checks package for NRPE checked hosts/services======================================================*Checks pack for monitoring Unix/Linux or Windows hosts with NRPE active checks*.. image:: https://badge.fury.io/py/alignak_checks_nrpe.svg:target: https://badge.fury.io/py/alignak-checks-nrpe:alt: Most recent PyPi version.. image:: https://img.shields.io/badge/IRC-%23alignak-1e72ff.svg?style=flat:target: http://webchat.freenode.net/?channels=%23alignak:alt: Join the chat #alignak on freenode.net.. image:: https://img.shields.io/badge/License-AGPL%20v3-blue.svg:target: http://www.gnu.org/licenses/agpl-3.0:alt: License AGPL v3**Note:** *this check pack is only an example for checking linux / windows hosts using the Nagios NRPE commands. Please feel free to comment or suggest improvements :)*Installation------------The installation of this checks pack will copy some configuration files in the Alignak default configuration directory (eg. */usr/local/share/alignak/etc*).The copied files are located in the default sub-directory used for the packs (eg. *arbiter/packs* for the Nagios legacy cfg files or *arbiter/backend-json* for the backend importable files).From Alignak packages repositories~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~More information in the online Alignak documentation. Here is only an abstract...Debian::# Alignak DEB stable packagessudo echo deb https://dl.bintray.com/alignak/alignak-deb-stable xenial main | sudo tee -a /etc/apt/sources.list.d/alignak.listsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv D401AB61sudo apt-get updatesudo apt install python-alignak-checks-nrpeCentOS::sudo vi /etc/yum.repos.d/alignak-stable.repo:[Alignak-rpm-stable]name=Alignak RPM stable packagesbaseurl=https://dl.bintray.com/alignak/alignak-rpm-stablegpgcheck=0repo_gpgcheck=0enabled=1sudo yum repolistsudo yum install python-alignak-checks-nrpe.. note:: for Python 3 version, replace ``python`` with ``python3`` in the packages name.From PyPI~~~~~~~~~To install the package from PyPI::# Python 2sudo pip install alignak-checks-nrpe# Python 3sudo pip3 install alignak-checks-nrpeFrom source files~~~~~~~~~~~~~~~~~To install the package from the source files::git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-nrpecd alignak-checks-nrpesudo pip install .**Note:** *using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)*Documentation-------------Configuration~~~~~~~~~~~~~This checks pack is using the `check_nrpe` Nagios plugin that must be installed on the Alignak server running your poller daemon.For Unix (FreeBSD), you can simply install the NRPE plugin::# Simple NRPEpkg install nrpe# NRPE with SSLpkg install nrpe-ssl# Take care to copy/rename the check_nrpe2 to check_nrpe if needed! Else, replace the check_nrpe# command with check_nrpe2For Linux distros, install the Nagios ``check_nrpe`` plugin from your system repository::# Install local NRPE pluginsudo apt-get install nagios-nrpe-plugin# Note: This may install all the Nagios stuff on your machine...After installation, the plugins are commonly installed in the */usr/local/libexec/nagios* directory.The */usr/local/etc/alignak/arbiter/packs/resource.d/nrpe.cfg* file defines a global macrothat contains the NRPE check plugin installation path. You must edit this file to update the default path that is defined to the alignak ``$NAGIOSPLUGINSDIR$`` (defined in alignak default configuration).::#-- NRPE check plugin installation directory# Default is to use the Alignak plugins directory$NRPE_PLUGINS_DIR$=$NAGIOSPLUGINSDIR$#--**Note:** the default value for ``$NAGIOSPLUGINSDIR$`` is set as */usr/lib/nagios/plugins* which is the common installation directory used by the Nagios plugins.Prepare Unix/Linux monitored hosts~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Some operations are necessary on the monitored hosts if NRPE remote access is not yet activated.::# Install local NRPE serversu -apt-get updateapt-get install nagios-nrpe-serverapt-get install nagios-plugins# Allow Alignak as a remote hostvi /etc/nagios/nrpe.cfg=>allowed_hosts = X.X.X.X# Restart NRPE daemon/etc/init.d/nagios-nrpe-server startTest remote access with the plugins files:::/usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1 -t 9 -u -c check_load**Note**: This configuration is the default Nagios NRPE daemon configuration. As such it does not allow to define arguments in the NRPE commands and, as of it, the warning / critical threshold are defined on the server side.Prepare Windows monitored hosts~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Some operations are necessary on the Windows monitored hosts if NSClient++ is not yet installed and running.Install and configure NSClient++ to allow remote NRPE checks. The example below is an NSClient Ini configuration file that allows to use the NRPE server.::# -----------------------------------------------------------------------------# c:\Program Files\NSClient++\nsclient.ini# -----------------------------------------------------------------------------[/modules]CheckExternalScripts = 1CheckEventLog = 1CheckDisk = 1CheckSystem = 1NRPEServer = 1[/settings/default]; Alignak server Ip addressallowed hosts = address = 192.168.15.1[/settings/external scripts/alias]alias_cpu = checkCPU warn=80 crit=90 time=5m time=1m time=30salias_cpu_ex = checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30salias_disk = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXEDalias_disk_loose = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED ignore-unreadablealias_event_log = CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 "filter=generated gt -2d AND severity NOT IN ('success', 'informational') AND source != 'SideBySide'" truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%count%)"alias_file_age = checkFile2 filter=out "file=$ARG1$" filter-written=>1d MaxWarn=1 MaxCrit=1 "syntax=%filename% %write%"alias_file_size = CheckFiles "filter=size > $ARG2$" "path=$ARG1$" MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%" max-dir-depth=10alias_mem = checkMem MaxWarn=80% MaxCrit=90% ShowAll=long type=physical type=virtual type=paged type=pagealias_process = checkProcState "$ARG1$=started"alias_process_count = checkProcState MaxWarnCount=$ARG2$ MaxCritCount=$ARG3$ "$ARG1$=started"alias_process_hung = checkProcState MaxWarnCount=1 MaxCritCount=1 "$ARG1$=hung"alias_process_stopped = checkProcState "$ARG1$=stopped"alias_sched_all = CheckTaskSched "filter=exit_code ne 0" "syntax=%title%: %exit_code%" warn=>0alias_sched_long = CheckTaskSched "filter=status = 'running' AND most_recent_run_time < -$ARG1$" "syntax=%title% (%most_recent_run_time%)" warn=>0alias_sched_task = CheckTaskSched "filter=title eq '$ARG1$' AND exit_code ne 0" "syntax=%title% (%most_recent_run_time%)" warn=>0alias_service = checkServiceState CheckAllalias_service_ex = checkServiceState CheckAll "exclude=Net Driver HPZ12" "exclude=Pml Driver HPZ12" exclude=stisvcalias_up = checkUpTime MinWarn=1d MinWarn=1halias_updates = check_updates -warning 0 -critical 0alias_volumes = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXEDalias_volumes_loose = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED ignore-unreadabledefault =[/settings/NRPE/server]; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.allow arguments = trueallow nasty characters = falseinsecure = trueencoding = utf8Test remote access with the plugins files::/usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1 -t 9 -u -c check_loadAlignak configuration~~~~~~~~~~~~~~~~~~~~~For a Linux monitored host, you simply have to tag the concerned host with the template ``linux-nrpe``.::define host{use linux-nrpehost_name linux_nrpeaddress 127.0.0.1}For a Windows monitored host, you simply have to tag the concerned host with the template ``windows-nrpe``.::define host{use windows-nrpehost_name windows_nrpeaddress 127.0.0.1}Bugs, issues and contributing-----------------------------Contributions to this project are welcome and encouraged ... `issues in the project repository <https://github.com/alignak-monitoring-contrib/alignak-checks-nrpe/issues>`_ are the common way to raise an information.
|
alignak_checks_snmp
|
Checks pack for monitoring Unix/Linux or Windows hosts with SNMP active checksNotethat the Windows part for this pack is not yet available.If you are interested in such a checks pack and if you are monitoring some Windows hosts with SNMP, please contact us (IRC or open an issue in this project)InstallationThe installation of this checks pack will copy some configuration files in the Alignak default configuration directory (eg./usr/local/share/alignak/etc).
The copied files are located in the default sub-directory used for the packs (eg.arbiter/packsfor the Nagios legacy cfg files orarbiter/backend-jsonfor the backend importable files).From Alignak packages repositoriesMore information in the online Alignak documentation. Here is only an abstract…Debian:# Alignak DEB stable packages
sudo echo deb https://dl.bintray.com/alignak/alignak-deb-stable xenial main | sudo tee -a /etc/apt/sources.list.d/alignak.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv D401AB61
sudo apt-get update
sudo apt install python-alignak-checks-snmpCentOS:sudo vi /etc/yum.repos.d/alignak-stable.repo:
[Alignak-rpm-stable]
name=Alignak RPM stable packages
baseurl=https://dl.bintray.com/alignak/alignak-rpm-stable
gpgcheck=0
repo_gpgcheck=0
enabled=1
sudo yum repolist
sudo yum install python-alignak-checks-snmpNotefor Python 3 version, replacepythonwithpython3in the packages name.From PyPITo install the package from PyPI:# Python 2
sudo pip install alignak-checks-snmp
# Python 3
sudo pip3 install alignak-checks-snmpFrom source filesTo install the package from the source files:git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-snmp
cd alignak-checks-snmp
sudo pip install .Note:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)DocumentationThis checks pack is using the some PERL plugins that are shipped with the checks pack, but some PERL dependencies are necessary.Install PERL dependencies for PERL pluginsOn some Linux distros, you can:sudo apt-get install libsnmp-perl libnet-snmp-perlOr you can use the PERLcpanutility:cpan install Net::SNMPConfigurationEdit the/usr/local/share/alignak/etc/arbiter/packs/snmp/resources.cfgfile and configure the SNMP community.:#-- Default SNMP community
$SNMPCOMMUNITYREAD$=publicPrepare hostSome operations are necessary on the monitored hosts if SNMP remote access is not yet activated.# Install local SNMP agent
su -
apt-get update
apt-get install snmpd
# Allow SNMP get - this configuration is intended for tests puuposes
# You should set up a more secure configuration and not allow everyone to see everything :)
vi /etc/snmp/snmpd.conf
=>
# Listen for connections from the local system only
#agentAddress udp:127.0.0.1:161
# Listen for connections on all interfaces (both IPv4 *and* IPv6)
agentAddress udp:161,udp6:[::1]:161
=>
# rocommunity public default -V systemonly
rocommunity public
# Restart SNMP agent
sudo systemctl restart snmpd.serviceTest remote access with the plugins files:$ /usr/local/var/libexec/alignak/check_snmp_mem.pl -H 127.0.0.1 -C public -w 80,80 -c 90,95
Ram : 71%, Swap : 58% : ; OKAlignak configurationTo define the SNMP community to be used per default, edit theresources.cfgfile and change the default value.$SNMPCOMMUNITYREAD$=publicYou simply have to tag the concerned hosts with the templatelinux-snmp.define host{
use linux-snmp
host_name host_snmp
address 127.0.0.1
}The mainlinux-snmptemplate declares macros used to configure the launched checks. The default values of these macros listed hereunder can be overriden in each host configuration._SNMPCOMMUNITY $SNMPCOMMUNITYREAD$
_SNMP_MSG_MAX_SIZE 65535
_LOAD_WARN 2,2,2
_LOAD_CRIT 3,3,3
_STORAGE_WARN 90
_STORAGE_CRIT 95
_CPU_WARN 80
_CPU_CRIT 90
_MEMORY_WARN 80,80
_MEMORY_CRIT 95,95
_NET_IFACES eth\d+|em\d+
_NET_WARN 90,90,0,0,0,0
_NET_CRIT 0,0,0,0,0,0To set a specific value for an host, declare the same macro in the host definition file.define host{
use linux-snmp
host_name host_snmp
address 127.0.0.1
# Specific values for this host
# Change warning and critical alerts level for memory
# Same for CPU, ALL_CPU, DISK, LOAD, NET, ...
_LOAD_WARN 3,3,3
_LOAD_CRIT 5,5,5
}Bugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak_checks_windows_nsca
|
Checks pack for monitoring Windows hosts with NSCA passive checksInstallationThe installation of this checks pack will copy some configuration files in the Alignak default configuration directory (eg./usr/local/etc/alignak). The copied files are located in the default sub-directory used for the packs (eg.arbiter/packs).From PyPITo install the package from PyPI:sudo pip install alignak-checks-windows-nscaFrom source filesTo install the package from the source files:git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-windows-nsca
cd alignak-checks-windows-nsca
sudo pip install .Note:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)DocumentationConfigurationThis checks pack do not need any specific configuration.Prepare Windows hostSome operations are necessary on the Windows monitored hosts if NSClient++ is not yet installed and running.Install and configure NSClient++ for scheduled NSCA checks.The first example below is an NSClient configuration file and it schedules the NSCa checks with the default NSClient pre-installed commands (see alias). The second example is an NSClient registry configuration that defines its own commands in the NSCA scheduled checks. Anyway, for more information, we invite you to consult theNSClient ++ Web site.NSClient++ Ini file configuration example:[/modules]
CheckDisk = 1
CheckEventLog = 1
CheckExternalScripts = 1
CheckHelpers = 1
CheckNSCP = 1
CheckSystem = 1
CheckWMI = 1
NSCAClient = 1
Scheduler = 1
[/settings/default]
; Alignak server Ip address
allowed hosts = address = 192.168.15.1
[/settings/external scripts/alias]
alias_cpu = checkCPU warn=80 crit=90 time=5m time=1m time=30s
alias_cpu_ex = checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s
alias_disk = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED
alias_disk_loose = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED ignore-unreadable
alias_event_log = CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 "filter=generated gt -2d AND severity NOT IN ('success', 'informational') AND source != 'SideBySide'" truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%count%)"
alias_file_age = checkFile2 filter=out "file=$ARG1$" filter-written=>1d MaxWarn=1 MaxCrit=1 "syntax=%filename% %write%"
alias_file_size = CheckFiles "filter=size > $ARG2$" "path=$ARG1$" MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%" max-dir-depth=10
alias_mem = checkMem MaxWarn=80% MaxCrit=90% ShowAll=long type=physical type=virtual type=paged type=page
alias_process = checkProcState "$ARG1$=started"
alias_process_count = checkProcState MaxWarnCount=$ARG2$ MaxCritCount=$ARG3$ "$ARG1$=started"
alias_process_hung = checkProcState MaxWarnCount=1 MaxCritCount=1 "$ARG1$=hung"
alias_process_stopped = checkProcState "$ARG1$=stopped"
alias_sched_all = CheckTaskSched "filter=exit_code ne 0" "syntax=%title%: %exit_code%" warn=>0
alias_sched_long = CheckTaskSched "filter=status = 'running' AND most_recent_run_time < -$ARG1$" "syntax=%title% (%most_recent_run_time%)" warn=>0
alias_sched_task = CheckTaskSched "filter=title eq '$ARG1$' AND exit_code ne 0" "syntax=%title% (%most_recent_run_time%)" warn=>0
alias_service = checkServiceState CheckAll
alias_service_ex = checkServiceState CheckAll "exclude=Net Driver HPZ12" "exclude=Pml Driver HPZ12" exclude=stisvc
alias_up = checkUpTime MinWarn=1d MinWarn=1h
alias_updates = check_updates -warning 0 -critical 0
alias_volumes = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED
alias_volumes_loose = CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED ignore-unreadable
default =
[/settings/scheduler]
threads = 5
[/settings/scheduler/schedules/default]
channel = NSCA
interval = 300s
report = all
[/settings/scheduler/schedules]
; Services to be checked
nsca_cpu = alias_cpu
nsca_memory = alias_mem
nsca_disk = alias_disk
nsca_uptime = alias_up
nsca_services = alias_service_ex
[/settings/NSCA/client]
channel = NSCA
; The same host name configured in Alignak
hostname = win2k8
[/settings/NSCA/client/targets/default]
; Alignak server Ip address
address = 192.168.15.1
port = 5667
allowed ciphers = ADH
certificate =
encryption =
password = change-me
timeout = 30
use ssl = false
verify mode = none
[/settings/log]
date format = %Y-%m-%d %H:%M:%S
file name = ${exe-path}/nsclient.log
level = info
; TODO
[/settings/scheduler/schedules/check_alive]
; Undocumented key
alias = host_check
; SCHEDULE COMMAND - Command to execute
command = check_ok
; TODO
[/settings/external scripts/wrappings]
; BATCH FILE WRAPPING -
bat = scripts\\%SCRIPT% %ARGS%
; POWERSHELL WRAPPING -
ps1 = cmd /c echo If (-Not (Test-Path "scripts\%SCRIPT%") ) { Write-Host "UNKNOWN: Script `"%SCRIPT%`" not found."; exit(3) }; scripts\%SCRIPT% $ARGS$; exit($lastexitcode) | powershell.exe /noprofile -command -
; VISUAL BASIC WRAPPING -
vbs = cscript.exe //T:30 //NoLogo scripts\\lib\\wrapper.vbs %SCRIPT% %ARGS%NSClient++ registry configuration example:Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++]
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++\modules]
"SyslogClient"="0"
"Scheduler"="1"
"NRPEServer"="1"
"NRDPClient"="0"
"SMTPClient"="0"
"LUAScript"="0"
"PythonScript"="0"
"DotnetPlugins"="0"
"CheckWMI"="1"
"GraphiteClient"="0"
"NRPEClient"="0"
"SimpleFileWriter"="0"
"CheckTaskSched"="1"
"NSClientServer"="0"
"CheckSystem"="1"
"CheckExternalScripts"="1"
"CheckHelpers"="1"
"NSCAClient"="1"
"CheckEventLog"="1"
"SimpleCache"="0"
"CheckLogFile"="0"
"NSCAServer"="0"
"CheckDisk"="1"
"CheckNSCP"="1"
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++\settings\NSCA]
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++\settings\NSCA\client]
"hostname"="auto"
"channel"="NSCA"
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++\settings\NSCA\client\targets]
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++\settings\NSCA\client\targets\default]
"use ssl"=dword:00000000
"certificate"=""
"allowed ciphers"=""
"timeout"=dword:0000001e
"verify mode"="none"
"address"="alignak.net"
"password"="alignak_nsca_receiver_password"
"encryption"="xor"
"payload length"="4096"
"buffer length"="4096"
"port"="5667"
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++\settings\scheduler]
"threads"=dword:00000005
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++\settings\scheduler\schedules]
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++\settings\scheduler\schedules\check_alive]
"alias"="host_check"
"command"="check_ok"
"interval"="300s"
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++\settings\scheduler\schedules\check_PC_cpu]
"alias"="nsca_cpu"
"command"="CheckCPU warn=75 crit=90 time=30m time=15m time=5m"
"interval"="1800s"
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++\settings\scheduler\schedules\check_PC_disk]
"alias"="nsca_disk"
"command"="CheckDriveSize Drive=C: MaxWarn=75% MaxCrit=85%"
"interval"="1800s"
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++\settings\scheduler\schedules\check_PC_memory]
"alias"="nsca_memory"
"command"="CheckMem MaxWarn=75% MaxCrit=90% ShowAll type=physical type=virtual type=paged type=page"
"interval"="1800s"
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++\settings\scheduler\schedules\check_PC_uptime]
"alias"="nsca_uptime"
"command"="CheckUptime MaxCrit=25h MinWarn=35m"
"interval"="1800s"
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++\settings\scheduler\schedules\check_swServices]
"alias"="nsca_services"
"command"="CheckServiceState CheckAll exclude=ShellHWDetection exclude=MMCSS exclude=clr_optimization_v4.0.30319_32 exclude=sppsvc exclude=StiSvc exclude=WMPNetworkSvc exclude=debugregsvc exclude=DoSvc exclude=MapsBroker exclude=CDPSvc exclude=WbioSrvc exclude=gpsvc exclude=tiledatamodelsvc exclude=wscsvc"
"interval"="3600s"
[HKEY_LOCAL_MACHINE\SOFTWARE\NSClient++\settings\scheduler\schedules\default]
"target"="remote_host"
"report"="all"
"interval"="3600s"
"channel"="NSCA"Alignak configurationYou simply have to tag the concerned hosts with the templatewindows-passive-host.define host{
use windows-passive-host
host_name my_windows_passive_host
address 0.0.0.0
}and this host will automatically inherit from the template parameters and services.Bugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak_checks_wmi
|
Alignak checks package for Windows WMI======================================*Checks pack for monitoring hosts with Windows Management Instrumentation (WMI)*.. image:: https://badge.fury.io/py/alignak_checks_wmi.svg:target: https://badge.fury.io/py/alignak-checks-wmi:alt: Most recent PyPi version.. image:: https://img.shields.io/badge/IRC-%23alignak-1e72ff.svg?style=flat:target: http://webchat.freenode.net/?channels=%23alignak:alt: Join the chat #alignak on freenode.net.. image:: https://img.shields.io/badge/License-AGPL%20v3-blue.svg:target: http://www.gnu.org/licenses/agpl-3.0:alt: License AGPL v3Installation------------The installation of this checks pack will copy some configuration files in the Alignak default configuration directory (eg. */usr/local/etc/alignak*). The copied files are located in the default sub-directory used for the packs (eg. *arbiter/packs*).From PyPI~~~~~~~~~To install the package from PyPI:::sudo pip install alignak-checks-wmiFrom source files~~~~~~~~~~~~~~~~~To install the package from the source files:::git clone https://github.com/Alignak-monitoring-contrib/alignak-checks-wmicd alignak-checks-wmisudo pip install .**Note:** *using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)*Documentation-------------Configuration~~~~~~~~~~~~~**Note**: this pack embeds the ``wmic`` binary that is not always easy to find for Linux distributions :/The embedded version of ``wmic`` is only compatible with Linux distros. For Unix (FreeBSD), you can simply install the wmic port:::pkg install wmi-clientcd /var/cache/pkg/tar Jxvf wmi-client-1.3.16_1.txz# winexe and wmic scripts are available in /usr/local/bin/The *check_wmi_plus.pl* script assumes that the executable *wmic* is installed in the Alignak plugins directory.Edit the *check_wmi_plus.conf* configuration file to change the *wmic* location if necessary. The variable to set is **$wmic_command**.**Note:** The files *check_wmi_plus.pl* and *check_wmi_plus.conf*, located in the */usr/local/var/libexec/alignak*, need some configuration. Edit them and search for the ALIGNAK keyword to find out what is to be configured and set according to your server.Edit the */usr/local/etc/alignak/arbiter/packs/resource.d/wmi.cfg* file and configure the domain name, user name and password allowed to access remotely to the monitored hosts WMI.::#-- Active Directory for WMI# Replace MYDOMAIN with your domain name or . for local user account$DOMAIN$=MYDOMAIN# Replace MYUSER with the WMI authorized user (domain or local user account)$DOMAINUSERSHORT$=MYUSER$DOMAINUSER$=$DOMAIN$\\$DOMAINUSERSHORT$# Replace MYPASSWORD with the WMI authorized user password$DOMAINPASSWORD$=MYPASSWORDInstall PERL dependencies for check_wmi_plus plugin~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You must install some PERL dependencies for the *check_wmi_plus.pl* script.On some Linux distros, you can::su -apt-get install libnumber-format-perlapt-get install libconfig-inifiles-perlapt-get install libdatetime-perlOr you can use the PERL *cpan* utility::cpan install Config::IniFilescpan install Number::Formatcpan install DateTimeMore information is available on `Check WMI Plus Web site<http://edcint.co.nz/checkwmiplus/?q=Installation>`_.Prepare Windows host~~~~~~~~~~~~~~~~~~~~Some operations are necessary on the Windows monitored hosts if WMI remote access is not yet activated.Create a user account:- username/password (example): alignak/alignak- member of following groups: Administrators, Remote DCOM users- Deactivate interactive login permissions (more secure)Check that WMI and RPC services are startedThe Windows Firewall must allow inbound trafic for:- Windows Firewall Remote Management (RPC)- Windows Management Instrumentation (DCOM-In)- Windows Management Instrumentation (WMI-In)This page contains more information about remote WMI configuration: https://kb.op5.com/display/HOWTOs/Agentless+Monitoring+of+Windows+using+WMITest remote WMI access with the plugins files:::# Basic wmic command ...$ /usr/local/var/libexec/alignak/wmic -U .\\alignak%alignak //192.168.0.20 'Select Caption From Win32_OperatingSystem'# Alignak plugin command ...$ /usr/local/var/libexe/alignak/check_wmi_plus.pl -H 192.168.0.20 -u ".\\alignak" -p "alignak" -m checkdrivesize -a '.' -w 90 -c 95 -o 0 -3 1 --inidir=/usr/local/var/libexec/alignak**Note**: these commands assume that you created an *alignak* user account with *alignak* as a password.As a default, WMI opens random TCP ports to communicate with the requesting customer. The Windows WMI service can be configured to use only one port as explained here:https://msdn.microsoft.com/en-us/library/bb219447(v=vs.85).aspx.An abstract of this article::To set up a fixed port for WMI1. Stop the WMI service by typing the command: net stop "Windows Management Instrumentation", or net stop winmgmt2. At the command prompt, type: winmgmt -standalonehost3. Restart the WMI service again in a new service host by typing: net start "Windows Management Instrumentation" or net start winmgmt4. Establish a new port number for the WMI service by typing: netsh firewall add portopening TCP 24158 WMIFixedPortTo undo any changes you make to WMI, type: winmgmt /sharedhost, then stop and start the winmgmt service again.Alignak configuration~~~~~~~~~~~~~~~~~~~~~You simply have to tag the concerned hosts with the template `windows-wmi`.::define host{use windows-wmihost_name host_windows_wmiaddress 127.0.0.1}The main `windows-wmi` template declares macros used to configure the launched checks. The default values of these macros listed hereunder can be overriden in each host configuration.::_DOMAIN $DOMAIN$_DOMAINUSERSHORT $DOMAINUSERSHORT$_DOMAINUSER $_HOSTDOMAIN$\\$_HOSTDOMAINUSERSHORT$_DOMAINPASSWORD $DOMAINPASSWORD$_WINDOWS_DISK_WARN 90_WINDOWS_DISK_CRIT 95_WINDOWS_EVENT_LOG_WARN 1_WINDOWS_EVENT_LOG_CRIT 2_WINDOWS_REBOOT_WARN 15min:_WINDOWS_REBOOT_CRIT 5min:_WINDOWS_MEM_WARN 80_WINDOWS_MEM_CRIT 90_WINDOWS_ALL_CPU_WARN 80_WINDOWS_ALL_CPU_CRIT 90_WINDOWS_CPU_WARN 80_WINDOWS_CPU_CRIT 90_WINDOWS_LOAD_WARN 10_WINDOWS_LOAD_CRIT 20_WINDOWS_NET_WARN 80_WINDOWS_NET_CRIT 90_WINDOWS_EXCLUDED_AUTO_SERVICES_WINDOWS_AUTO_SERVICES_WARN 0_WINDOWS_AUTO_SERVICES_CRIT 1_WINDOWS_BIG_PROCESSES_WARN 25#Default Network Interface_WINDOWS_NETWORK_INTERFACE Ethernet# Now some alert level for a windows host_WINDOWS_SHARE_WARN 90_WINDOWS_SHARE_CRIT 95To set a specific value for an host, declare the same macro in the host definition file.::define host{use windows-wmicontact_groups adminshost_name sim-vmaddress 192.168.0.16# Specific values for this host# Change warning and critical alerts level for memory# Same for CPU, ALL_CPU, DISK, LOAD, NET, ..._WINDOWS_MEM_WARN 10_WINDOWS_MEM_CRIT 20# Exclude some services from automatic start check# Use a regexp that matches against the short or long service name as it can be seen in the properties of the service in Windows.# The matching services are excluded in the resulting list.# Example: (ShortName)|(ShortName)| ... |(ShortName)_WINDOWS_EXCLUDED_AUTO_SERVICES (IAStorDataMgrSvc)|(MMCSS)|(ShellHWDetection)|(sppsvc)|(clr_optimization_v4.0.30319_32)}Bugs, issues and contributing-----------------------------Contributions to this project are welcome and encouraged ... `issues in the project repository <https://github.com/alignak-monitoring-contrib/alignak-checks-wmi/issues>`_ are the common way to raise an information.
|
alignak_demo
|
Setting-up a demonstration server for Alignak monitoring framework …This repository contains many stuff for Alignak:demo configuration to set-up a demo server (the one used forhttp://demo.alignak.net)some various tests configurations (each having a README to explain what they are made for)scripts to run the Alignak daemons for the demo server (may be used for other configurations)What’s behind the demo serverThis demonstration is made to involve the most possible Alignak components on a single node server.To set-up this demo, you must:install Alignakinstall Alignak backendinstall Alignak Web UIinstall Alignak modules (backend and nsca)install Alignak checks packs (NRPE, WMI, SNMP, …)import the configuration into the backendstart the backend, the Web UI and Alignakopen your web browser and rest for a while looking at what happens :)Note: it is possible to run Alignak without the backend and the WebUI. all the monitoring events are then available in the monitoring logs but, with this small configuration, one will loose the benefits ;)The monitored configurationOn a single server, the monitored configuration is separated in fourrealms(All,North,SouthandSouth-East).
Some hosts are in theAllrealm and others are in theNorthandSouthrealm, both sub-realms ofAllrealm. TheSouth-Eastrealm is a sub-realm ofSouthand it also contains some hosts.TheAllrealm is (let’s say…) a primary datacenter where main servers are located.NorthandSouthrealms are a logical group for a part of our monitored configuration. They may be seen as secondary sites.According to Alignak daemon logic, the master Arbiter dispatches the configuration to the daemons of each realm and we must declare, for each realm:a schedulera brokera pollera receiver (not mandatory but we want to have NSCA collector)In theAllrealm, we find the following hosts:localhostand some othersIn theNorthrealm, we find some passive hosts checked thanks to NSCA.In theSouthrealm, we find some other hosts.RequirementsMandatory requirementsYou will need some requirements for setting-up this demonstration:# Update your server
sudo apt-get update
sudo apt-get upgrade
# Install git and python
sudo apt-get install git
sudo apt-get install python2.7 python2.7-dev python-pip
# Needed for the PyOpenSSL / Cryptography dependencies of Alignak
sudo apt-get install libffi-dev libssl-devOptional requirementsThe scripts provided with this demo use thescreenutility found on all Linux/Unix distro. As such:sudo apt-get install screenSome screen hint and tips:# Listing the active screens
screen -ls
# Joining a screen
screen -r alignak-backend
# Leaving a screen (without killing it)
screen -r alignak-backend
Ctrl a+d
# Switching between active screens
Ctrl a+nNote:It is not mandatory to use the provided scripts, but it is more simple for a first try;)Setting-up the demoWe recommend having an up-to-date system;)sudo apt-get update
sudo apt-get upgradeWe also recommend using the most recentpiputility. On many distros pip is currently available as version 8 whereas the version 9 is available:sudo pip install --upgrade pip1. Get base componentsNotethat all the Alignak components need a root account (orsudoprivilege) to get installed.Alignak frameworkmkdir ~/repos
cd ~/repos
# Alignak framework
git clone https://github.com/Alignak-monitoring/alignak
cd alignak
# Install alignak and all its python dependencies
# -v will activate the verbose mode of pip (not mandatory...)
sudo pip install -v .
# Create alignak user/group and set correct permissions on installed configuration files
sudo ./dev/set_permissions.shAlignak backend# Alignak backend
sudo pip install alignak-backend
# To allow alignak user to view the log files
sudo chown -R alignak:alignak /usr/local/var/log/alignak-backend/Notethat you will need to have a running Mongo database. See theAlignak backend installation procedureif you need to set one up and running.An excerpt for installing MongoDB on an Ubuntu Xenial:sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/testing multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo service mongod startAn excerpt for installing MongoDB on a debian Jessie:sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo service mongod startAlignak backend importation scriptAlignak ships a flat-file configuration importation script to feed the Alignak backend. This script is used to parse, check and import a Nagios-like configuration into the Alignak backend.Notethat it is not mandatory to install and use this script because the Alignak WebUI allows to create all the monitored objects configuration from scratch :)For this demo, we will install and use thealignak-backend-importscript? So let’s install it# Alignak backend importation script
sudo pip install alignak-backend-importAlignak webui# Alignak webui
sudo pip install alignak-webui
# To allow alignak user to view the log files
sudo chown -R alignak:alignak /usr/local/var/log/alignak-webui/Installed filesls -al /usr/local/etc/
total 20
drwxr-xr-x 5 root root 4096 sept. 1 08:06 ./
drwxr-xr-x 11 root root 4096 nov. 15 2016 ../
drwxrwxr-x 6 alignak alignak 4096 sept. 1 07:58 alignak/
drwxr-xr-x 2 root root 4096 sept. 1 08:01 alignak-backend/
drwxr-xr-x 2 root root 4096 sept. 1 08:06 alignak-webui/
ls -al /usr/local/etc/alignak
total 40
drwxrwxr-x 6 alignak alignak 4096 sept. 1 07:58 ./
drwxr-xr-x 5 root root 4096 sept. 1 08:06 ../
-rw-rw-r-- 1 alignak alignak 9122 sept. 1 07:58 alignak.cfg
-rw-rw-r-- 1 alignak alignak 3808 sept. 1 07:58 alignak.ini
drwxrwxr-x 8 alignak alignak 4096 sept. 1 07:58 arbiter/
drwxrwxr-x 2 alignak alignak 4096 sept. 1 07:58 certs/
drwxrwxr-x 2 alignak alignak 4096 sept. 1 07:58 daemons/
drwxrwxr-x 3 alignak alignak 4096 sept. 1 07:58 sample/
ls -al /usr/local/etc/alignak-backend
total 16
drwxr-xr-x 2 root root 4096 sept. 1 08:01 ./
drwxr-xr-x 5 root root 4096 sept. 1 08:06 ../
-rw-r--r-- 1 root root 1940 mars 7 07:09 settings.json
-rw-r--r-- 1 root root 1072 mars 7 07:09 uwsgi.ini
ls -al /usr/local/etc/alignak-webui
total 56
drwxr-xr-x 2 root root 4096 sept. 1 08:06 ./
drwxr-xr-x 5 root root 4096 sept. 1 08:06 ../
-rw-r--r-- 1 root root 853 févr. 28 2017 logging.json
-rwxr-xr-x 1 root root 37442 août 1 09:32 settings.cfg*
-rw-r--r-- 1 root root 1191 févr. 28 2017 uwsgi.ini
ls -al /usr/local/var/log
total 20
drwxr-xr-x 5 root root 4096 sept. 1 08:06 ./
drwxr-xr-x 6 root root 4096 sept. 1 07:58 ../
drwxr-xr-x 2 alignak alignak 4096 sept. 1 07:58 alignak/
drwxr-xr-x 2 alignak alignak 4096 sept. 1 08:01 alignak-backend/
drwxr-xr-x 2 alignak alignak 4096 sept. 1 08:06 alignak-webui/
ls -al /usr/local/var/run
total 12
drwxr-xr-x 3 root root 4096 sept. 1 07:58 ./
drwxr-xr-x 6 root root 4096 sept. 1 07:58 ../
drwxr-xr-x 2 alignak alignak 4096 sept. 1 07:58 alignak/2. Install check pluginsSome extra installation steps are still necessary because we are using some external plugins and then we need to install them.The NRPE checks package requires thecheck_nrpeplugin that is commonly available as:sudo apt-get install nagios-nrpe-pluginThe monitoring checks package requires some extra plugins. Installation and configuration procedure isavailable hereor on the Monitoring Plugins project page.You may instead install the Nagios plugins that are commonly available as:sudo apt-get install nagios-pluginsAs of now, you really installed all the necessary stuff for starting a demo monitoring application, 2nd step achieved!3. Get extension componentsNote: If you intend to set-up your own monitoring configuration, you are yet ready!The next three chapters explain how to install Alignak modules, checks and notifications for the demo server.Notebecause most of the checks packs are able to create the templates, commands,… directly into the Alignak backend during the installation processyou should start the Alignak backend before installing the checks packs and modules ;) See later in this document how to start the Alignak backend…To avoid executing all these configuration steps, you can install a all-in-one package that will install all the other packages thanks to its dependencies:# Alignak demo configuration
# IMPORTANT: use the --force argument to allow overwriting previously installed files!
sudo pip install alignak-demo --force
# Re-update permissions on installed configuration files
sudo ./dev/set_permissions.sh
mkdir ~/demo
cp /usr/local/var/libexec/alignak/*.sh ~/demoNote: it is the easisest solution to quickly have a running demo server, but it will miss all the important configuration part for a monitoring system :)Note: If you install the alignak-demo package, go directly to the step 5.ModulesExecute these steps only if you did not installed `alignak-demo`Get and install Alignak modules:# Those two modules are "almost" necessary for the essential alignak features
# If you do not install this module, you will not benefit from the Alignak backend features (retention, logs, timeseries, ...)
sudo pip install alignak-module-backend
# If you do not install this module, you will miss a log of all the alignak monitoring events: alerts, notifications, ...
sudo pip install alignak-module-logs
# Those are optional...
# Collect passive NSCA checks
sudo pip install alignak-module-nsca
# Write external commands (Nagios-like) to a local named file
sudo pip install alignak-module-external-commands
# Notify external commands though a WS and get Alignak state with your web browser
sudo pip install alignak-module-ws
# Improve NRPE checks
sudo pip install alignak-module-nrpe-booster
# Note that the default module configuration is not suitable, but it will be installed later...NotificationsExecute these steps only if you did not installed `alignak-demo`Get notifications package:# Install extra notifications package
sudo pip install alignak-notificationsNotethat this pack requires an SMTP server for the mail notifications to be sent out. If none is available you will get WARNING logs and the notifications will not be sent out, but the demo will run anyway :) See later in this document how to configure the mail notifications…Checks packagesExecute these steps only if you did not installed `alignak-demo`Notethat most of the checks packs are able to create the templates, commands,… directly into the Alignak backend during the installation process. To allow this creation, your Alignak backend must be running and available on its default interface (http://127.0.0.1:5000).Get checks packages:# Install checks packages according to the hosts you want to monitor
# Checks hosts thanks to NRPE Nagios active checks protocol
sudo pip install alignak-checks-nrpe
# Checks hosts thanks to old plain SNMP protocol
sudo pip install alignak-checks-snmp
# Checks hosts with "open source" Nagios plugins (eg. check_http, check_tcp, ...)
sudo pip install alignak-checks-monitoring
# Checks mysql database server
sudo pip install alignak-checks-mysql
# Checks Windows passively checked hosts/services (NSClient++ agent)
# As of now, use ==1.0rc1 to get the correct version
sudo pip install alignak-checks-windows-nsca
# Checks Windows with Microsoft Windows Management Instrumentation
sudo pip install alignak-checks-wmi
# Note that the default packs configuration is not always suitable, but it will be installed later...
# Restore alignak user/group ownership and set correct permissions on installed configuration files
sudo ./dev/set_permissions.shInstalled modules and filesFiles that were installed:ls -al /usr/local/etc/alignak
...
drwxr-xr-x 5 root root 4096 sept. 1 08:35 backend-json/
total 20
drwxrwxr-x 5 alignak alignak 4096 sept. 1 08:35 ./
drwxrwxr-x 7 alignak alignak 4096 sept. 1 08:13 ../
drwxrwxr-x 2 alignak alignak 4096 sept. 1 08:13 notifications/
drwxrwxr-x 2 alignak alignak 4096 sept. 1 08:31 snmp/
drwxrwxr-x 2 alignak alignak 4096 sept. 1 08:35 windows-nsca/
...
ls -al /usr/local/etc/alignak/arbiter/packs
total 36
drwxrwxr-x 8 alignak alignak 4096 sept. 1 08:35 ./
drwxrwxr-x 8 alignak alignak 4096 sept. 1 07:58 ../
drwxrwxr-x 2 alignak alignak 4096 sept. 1 08:31 mysql/
drwxrwxr-x 2 alignak alignak 4096 sept. 1 08:13 notifications/
drwxrwxr-x 2 alignak alignak 4096 sept. 1 08:31 nrpe/
-rw-rw-r-- 1 alignak alignak 128 sept. 1 07:58 readme.cfg
drwxrwxr-x 2 alignak alignak 4096 sept. 1 08:35 resource.d/
drwxrwxr-x 2 alignak alignak 4096 sept. 1 08:31 snmp/
drwxrwxr-x 2 alignak alignak 4096 sept. 1 08:35 wmi/Modules that were installed:pip list | grep alignak
alignak (0.2)
alignak-backend (0.9.0)
alignak-backend-client (0.9.4)
alignak-backend-import (0.9.2)
alignak-checks-mysql (0.3.0)
alignak-checks-nrpe (0.3.3)
alignak-checks-snmp (0.4.1)
alignak-checks-windows-nsca (0.4.1.2)
alignak-checks-wmi (0.3.0)
alignak-module-backend (0.9.1)
alignak-module-external-commands (0.3.1)
alignak-module-logs (0.5.5)
alignak-module-nrpe-booster (0.3.2)
alignak-module-nsca (0.3.3)
alignak-module-ws (0.6.0)
alignak-notifications (0.4.6)
alignak-webui (0.8.8.1)As of now, you installed all the necessary Alignak stuff for starting a demo monitoring application, 3rd step achieved!4. Configure Alignak and monitored hosts/servicesNote:you may configure Alignak on your own and set your proper monitored hosts and declare how to monitor them. This is the usual way for setting-up your monitoring solution… But, as we are in a demo process, and we want to make it simple, this repository has a prepared configuration to help going faster to a demonstration of Alignak features.For this demonstration, we imagined a distributed configuration in threerealms: All, North and South. This is not the default Alignak configuration (eg. one instance of each daemon in one realm) and thus it implies declaring and configuring extra daemons. As we are using some modules we also need to declare those modules in the corresponding daemons configuration. Alignak also has some configuration parameters that may be tuned.If you need more informationabout alignak configuration.To avoid dealing with all this configuration steps, this repository contains a default demo configuration that uses all (or almost…) the previously installed components.:# Alignak demo configuration
cd ~/repos
git clone https://github.com/Alignak-monitoring-contrib/alignak-demoSome extra configuration files are shipped in thealignak_demo/etcdirectory. You may copy those files to replace the default Alignak shipped configuration, but, as we will use the Alignak backend, most of the configuration will stay in the backend database and copying the files is not necessary.cp -R ~/demo/alignak-demo/alignak_demo/etc /usr/local/etc/alignakSome utility scripts are also shipped in thealignak_demo/libexecfolder. For ease of use, you may copy those scripts in your home directory.mkdir ~/demo
cp /usr/local/var/libexec/alignak/*.sh ~/demoAs explained previously, the shell scripts that you just copied use thescreenutility to detach the process execution from the current shell session.As of now, Alignak is configured and you are ready to run, 4th step achieved!5. Configure, run and feed Alignak backendIt is not necessary to change anything in the Alignak backend configuration file except if your MongoDB installation is not a local database configured by default. Else, open the/usr/local/etc/alignak-backend/settings.jsonconfiguration file to set-up the parameters according to your configuration.start / stop the backendRun the Alignak backend:cd ~/demo
# Detach a screen session identified as "alignak-backend" to run the backend processes
sudo ./alignak_backend_start.sh
# This will run the alignak-backend-uwsgi in a screen session. If you do not mind about a
# backend screen, you should run: sudo alignak-backend-uwsgi
# Using sudo because we assume that you are logged with a user account that is not the alignak one
ps -aux | grep uwsgi-
root 25193 0.5 0.4 238604 72044 9 I+J 10:13AM 7:10.69 uwsgi --ini /usr/local/etc/alignak-backend/uwsgi.ini
root 25191 0.0 0.0 17096 2076 9 I+J 10:13AM 0:00.00 /bin/sh /usr/local/bin/alignak-backend-uwsgi
root 25192 0.0 0.1 55876 10816 9 S+J 10:13AM 0:03.18 uwsgi --ini /usr/local/etc/alignak-backend/uwsgi.ini
root 25194 0.0 0.3 189536 57440 9 S+J 10:13AM 0:31.97 uwsgi --ini /usr/local/etc/alignak-backend/uwsgi.ini
root 25195 0.0 0.4 190048 60532 9 S+J 10:13AM 3:00.39 uwsgi --ini /usr/local/etc/alignak-backend/uwsgi.ini
root 25196 0.0 0.4 190304 60708 9 S+J 10:13AM 0:41.29 uwsgi --ini /usr/local/etc/alignak-backend/uwsgi.ini
# Joining the backend screen is 'screen -r alignak-backend'
# Ctrl+C in the screen will stop the backend
# kill -SIGTERM `cat /tmp/alignak-backend.pid`
# The alignak backend writes some logs as a Web server does
tail -f /usr/local/var/log/alignak-backend-error.log
tail -f /usr/local/var/log/alignak-backend-access.logThe alignak backend runs thanks to uWSGI and its configuration is available in the/usr/local/alignak-backend/uwsgi.iniwhere you can define the log files location. You can also configure the Alignak backend to send its internal metrics to a Graphite timeseries database.Notethat a Grafana dashboard for the Alignak backend is available in the/usr/local/etc/alignak/sample/grafanadirectory created when you installed the alignak-demo package;)Feed the backendRun the Alignak backend import script to push the demo configuration into the backend:# Import the demo configuration into the backend
cd ~/repos/alignak-demo
alignak-backend-import -d ./alignak_demo/etc/alignak-backend-import.cfgNote:there are other solutions to feed the Alignak backend but we choose to show how to get an existing configuration imported in the Alignak backend to migrate from an existing Nagios/Shinken to Alignak.Once imported, you can check that the configuration is correctly parsed by Alignak:# Check Alignak demo configuration (from the git repo)
alignak-arbiter -V -a ~/repos/alignak-demo/alignak_demo/etc/alignak.cfg
[2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Creating packs for realms
[2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Number of hosts in the realm North: 2 (distributed in 2 linked packs)
[2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Number of hosts in the realm South: 3 (distributed in 2 linked packs)
[2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Number of hosts in the realm All: 7 (distributed in 7 linked packs)
[2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Number of Contacts : 5
[2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Number of Hosts : 12
[2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Number of Services : 305
[2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Number of Commands : 78
[2017-01-06 11:57:28 CET] INFO: [alignak.objects.config] Total number of hosts in all realms: 12
[2017-01-06 11:57:28 CET] INFO: [alignak.daemons.arbiterdaemon] Things look okay - No serious problems were detected during the pre-flight check
[2017-01-06 11:57:28 CET] INFO: [alignak.daemons.arbiterdaemon] Arbiter checked the configurationNotebecause the backend is now started and available, there is no more ERROR raised during the configuration check! You may still have some information about duplicate elements but nothing to take care of…As of now, Alignak is ready to start… let us go!6. Run AlignakRun Alignak:cd ~/demo
# Define where to find the Alignak configuration file
# As default, it will use the */usr/local/etc/alignak/alignak.cfg* file. If you copied the
# files to the default location, it is not necessary to define those variables
export ALIGNAKCFG=~/repos/alignak-demo/alignak_demo/etc/alignak.cfg
export ALIGNAKCFG=~/repos/alignak-demo/alignak_demo/etc/daemons
# For FreeBSD users:
setenv ALIGNAKCFG /root/repos/alignak-demo/alignak_demo/
setenv ALIGNAKDAEMONS /root/repos/alignak-demo/alignak_demo/etc/daemons/
# Detach several screen sessions identified as "alignak-daemon_name"
./alignak_demo_start.sh
# Stopping Alignak is './alignak_demo_stop.sh'ProcessesAlignak runs many processes that you can check with:ps -ef --forest | grep alignak-
alignak 30166 1087 0 janv.06 ? 00:00:00 \_ SCREEN -d -S alignak-backend -m bash -c alignak-backend
alignak 30168 30166 0 janv.06 pts/18 00:08:31 | \_ /usr/bin/python /usr/local/bin/alignak-backend
alignak 22289 1087 0 09:55 ? 00:00:00 \_ SCREEN -d -S alignak_north_broker -m bash -c alignak-broker -c /usr/local/etc/alignak/daemons/North/brokerd-north.ini
alignak 22291 22289 0 09:55 pts/20 00:01:14 | \_ alignak-broker broker-north
alignak 22365 22291 0 09:55 pts/20 00:00:03 | \_ alignak-broker
alignak 22542 22291 0 09:55 pts/20 00:00:00 | \_ alignak-broker-north module: backend_broker
alignak 22292 1087 0 09:55 ? 00:00:00 \_ SCREEN -d -S alignak_north_poller -m bash -c alignak-poller -c /usr/local/etc/alignak/daemons/North//pollerd-north.ini
alignak 22296 22292 0 09:55 pts/21 00:00:49 | \_ alignak-poller poller-north
alignak 22349 22296 0 09:55 pts/21 00:00:02 | \_ alignak-poller
alignak 22601 22296 0 09:55 pts/21 00:00:01 | \_ alignak-poller-north worker
alignak 22294 1087 0 09:55 ? 00:00:00 \_ SCREEN -d -S alignak_north_scheduler -m bash -c alignak-scheduler -c /usr/local/etc/alignak/daemons/North//schedulerd-north.ini
alignak 22297 22294 0 09:55 pts/22 00:00:52 | \_ alignak-scheduler scheduler-north
alignak 22350 22297 0 09:55 pts/22 00:00:00 | \_ alignak-scheduler
alignak 22298 1087 0 09:55 ? 00:00:00 \_ SCREEN -d -S alignak_north_receiver -m bash -c alignak-receiver -c /usr/local/etc/alignak/daemons/North//receiverd-north.ini
alignak 22300 22298 0 09:55 pts/23 00:00:31 | \_ alignak-receiver receiver-north
alignak 22351 22300 0 09:55 pts/23 00:00:00 | \_ alignak-receiver
alignak 22600 22300 0 09:55 pts/23 00:00:00 | \_ alignak-receiver-north module: nsca_north
alignak 22310 1087 0 09:55 ? 00:00:00 \_ SCREEN -d -S alignak_south_broker -m bash -c alignak-broker -c /usr/local/etc/alignak/daemons/South/brokerd-south.ini
alignak 22312 22310 0 09:55 pts/24 00:01:01 | \_ alignak-broker broker-south
alignak 22414 22312 0 09:55 pts/24 00:00:03 | \_ alignak-broker
alignak 22547 22312 0 09:55 pts/24 00:00:07 | \_ alignak-broker-south module: backend_broker
alignak 22313 1087 0 09:55 ? 00:00:00 \_ SCREEN -d -S alignak_south_poller -m bash -c alignak-poller -c /usr/local/etc/alignak/daemons/South/pollerd-south.ini
alignak 22315 22313 0 09:55 pts/25 00:01:04 | \_ alignak-poller poller-south
alignak 22413 22315 0 09:55 pts/25 00:00:03 | \_ alignak-poller
alignak 22616 22315 0 09:55 pts/25 00:00:05 | \_ alignak-poller-south worker
alignak 22316 1087 0 09:55 ? 00:00:00 \_ SCREEN -d -S alignak_south_scheduler -m bash -c alignak-scheduler -c /usr/local/etc/alignak/daemons/South/schedulerd-south.ini
alignak 22318 22316 0 09:55 pts/26 00:00:53 | \_ alignak-scheduler scheduler-south
alignak 22415 22318 0 09:55 pts/26 00:00:00 | \_ alignak-scheduler
alignak 22326 1087 0 09:55 ? 00:00:00 \_ SCREEN -d -S alignak_broker -m bash -c alignak-broker -c /usr/local/etc/alignak/daemons/brokerd.ini
alignak 22328 22326 1 09:55 pts/27 00:01:48 | \_ alignak-broker broker-master
alignak 22469 22328 0 09:55 pts/27 00:00:06 | \_ alignak-broker
alignak 22551 22328 0 09:55 pts/27 00:00:31 | \_ alignak-broker-master module: backend_broker
alignak 22605 22328 0 09:55 pts/27 00:00:01 | \_ alignak-broker-master module: logs
alignak 22329 1087 0 09:55 ? 00:00:00 \_ SCREEN -d -S alignak_poller -m bash -c alignak-poller -c /usr/local/etc/alignak/daemons/pollerd.ini
alignak 22331 22329 0 09:55 pts/28 00:00:40 | \_ alignak-poller poller-master
alignak 22456 22331 0 09:55 pts/28 00:00:07 | \_ alignak-poller
alignak 22614 22331 0 09:55 pts/28 00:00:17 | \_ alignak-poller-master worker
alignak 22332 1087 0 09:55 ? 00:00:00 \_ SCREEN -d -S alignak_scheduler -m bash -c alignak-scheduler -c /usr/local/etc/alignak/daemons/schedulerd.ini
alignak 22334 22332 0 09:55 pts/29 00:01:20 | \_ alignak-scheduler scheduler-master
alignak 22475 22334 0 09:55 pts/29 00:00:00 | \_ alignak-scheduler
alignak 22335 1087 0 09:55 ? 00:00:00 \_ SCREEN -d -S alignak_receiver -m bash -c alignak-receiver -c /usr/local/etc/alignak/daemons/receiverd.ini
alignak 22337 22335 0 09:55 pts/30 00:00:57 | \_ alignak-receiver receiver-master
alignak 22457 22337 0 09:55 pts/30 00:00:00 | \_ alignak-receiver
alignak 22555 22337 0 09:55 pts/30 00:00:00 | \_ alignak-receiver-master module: nsca
alignak 22338 1087 0 09:55 ? 00:00:00 \_ SCREEN -d -S alignak_reactionner -m bash -c alignak-reactionner -c /usr/local/etc/alignak/daemons/reactionnerd.ini
alignak 22340 22338 0 09:55 pts/31 00:00:34 | \_ alignak-reactionner reactionner-master
alignak 22484 22340 0 09:55 pts/31 00:00:02 | \_ alignak-reactionner
alignak 22611 22340 0 09:55 pts/31 00:00:01 | \_ alignak-reactionner-master worker
alignak 22403 1087 0 09:55 ? 00:00:00 \_ SCREEN -d -S alignak_arbiter -m bash -c alignak-arbiter -c /usr/local/etc/alignak/daemons/arbiterd.ini --arbiter /usr/local/etc/alignak/alignak.cfg
alignak 22404 22403 1 09:55 pts/32 00:02:34 | \_ alignak-arbiter arbiter-master
alignak 22514 22404 0 09:55 pts/32 00:00:00 | \_ alignak-arbiterLog filesEach Alignak daemon has its own log file that you can find in the/usr/local/var/log/alignakfolder. If any error happen there will be at least an ERROR log in the corresponding file. You cantailthe log files or use more sophisticated tools likemultitailto stay tuned with Alignak activity# Using tail
tail -f /usr/local/var/log/alignak/*.log
# Using multitail
sudo apt-get install multitail
multitail -f /usr/local/var/log/alignak/arbiterd.log\
-f /usr/local/var/log/alignak/brokerd.log \
-f /usr/local/var/log/alignak/brokerd-north.log \
-f /usr/local/var/log/alignak/brokerd-south.log \
-f /usr/local/var/log/alignak/pollerd.log \
-f /usr/local/var/log/alignak/pollerd-north.log \
-f /usr/local/var/log/alignak/pollerd-south.log \
-f /usr/local/var/log/alignak/reactionnerd.log \
-f /usr/local/var/log/alignak/receiverd.log \
-f /usr/local/var/log/alignak/receiverd-north.log \
-f /usr/local/var/log/alignak/schedulerd.log \
-f /usr/local/var/log/alignak/schedulerd-north.log \
-f /usr/local/var/log/alignak/schedulerd-south.logTracking the plugin executionWhen setting up a new configuration and installing or testing plugins it may be interesting to have information about the launched check plugins and the returned results. Alignak allows to add information in the log files about plugins execution:# Set and export an environment variable
export TEST_LOG_ACTIONS=1This variable make some more logs in the log files for:
- launched command for the check plugins
- check plugins result
- notification commandsMonitoring eventsYou can follow the Alignak monitoring activity thanks to the monitoring events log created by the Logs module. You cantailthe/usr/local/var/log/alignak/monitoring-logs.logfile:[1483714809] INFO: CURRENT SERVICE STATE: chazay;System up-to-date;UNKNOWN;HARD;0;
[1483714809] INFO: CURRENT SERVICE STATE: passive-01;svc_TagReading_C;UNKNOWN;HARD;0;
[1483714809] INFO: CURRENT SERVICE STATE: passive-01;dev_TouchUI;UNKNOWN;HARD;0;
[1483714809] INFO: CURRENT SERVICE STATE: denice;Shinken Main Poller;UNKNOWN;HARD;0;
[1483714809] INFO: CURRENT SERVICE STATE: localhost;Cpu;UNKNOWN;HARD;0;
[1483714812] INFO: SERVICE ALERT: chazay;CPU;OK;HARD;0;OK - CPU usage is 39% for server chazay.siprossii.com.
[1483714816] INFO: SERVICE ALERT: alignak_glpi;Zombies;OK;HARD;0;PROCS OK: 0 processes with STATE = Z
[1483714837] INFO: SERVICE ALERT: chazay;NTP;OK;HARD;0;NTP OK: Offset -0.003250718117 secs
[1483714851] INFO: SERVICE ALERT: chazay;Memory;OK;HARD;0;Memory OK - 69.7% (23959990272 kB) used
[1483714853] ERROR: HOST NOTIFICATION: guest;cogny;DOWN;notify-host-by-xmpp;CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
[1483714853] ERROR: HOST NOTIFICATION: imported_admin;cogny;DOWN;notify-host-by-xmpp;CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
[1483714862] INFO: SERVICE ALERT: chazay;I/O stats;OK;HARD;0;OK - data received
[1483714886] INFO: SERVICE ALERT: chazay;Users;OK;HARD;0;USERS OK - 0 users currently logged in
[1483714902] INFO: SERVICE ALERT: alignak_glpi;Load;OK;HARD;0;OK - load average: 0.60, 0.54, 0.52
[1483714903] INFO: SERVICE ALERT: chazay;Firewall routes;OK;HARD;0;PF OK - states: 1316 (6% - limit: 20000)
[1483714903] INFO: SERVICE ALERT: cogny;Http;OK;HARD;0;HTTP OK: HTTP/1.1 200 OK - 2535 bytes in 0,199 second response time
[1483714905] INFO: HOST ALERT: alignak_glpi;UP;HARD;0;NRPE v2.15
[1483714909] ERROR: HOST NOTIFICATION: imported_admin;localhost;DOWN;notify-host-by-xmpp;[Errno 2] No such file or directory
[1483714909] ERROR: HOST ALERT: localhost;DOWN;HARD;0;[Errno 2] No such file or directory
[1483714910] ERROR: HOST ALERT: always_down;DOWN;HARD;0;[Errno 2] No such file or directory
[1483714910] ERROR: HOST NOTIFICATION: imported_admin;always_down;DOWN;notify-host-by-xmpp;[Errno 2] No such file or directory
[1483714939] INFO: HOST ALERT: chazay;UP;HARD;0;NRPE v2.15
[1483714966] INFO: SERVICE ALERT: m2m-asso.fr;Http;OK;HARD;0;HTTP OK: HTTP/1.1 200 OK - 6016 bytes in 3,227 second response timeMonitoring events configurationThis file is a log of all the monitoring activity of Alignak. Thealignak.cfgallows to define what are the events that are logged to this file. By default, only the active and passive checks ran by Alignak are not logged to this file:# Monitoring log configuration
# ---
# Note that alerts and downtimes are always logged
# ---
# Notifications
# log_notifications=1
# Services retries
# log_service_retries=1
# Hosts retries
# log_host_retries=1
# Event handlers
# log_event_handlers=1
# Flappings
# log_flappings=1
# Snapshots
# log_snapshots=1
# External commands
# log_external_commands=1
# Active checks
# log_active_checks=0
# Passive checks
# log_passive_checks=0
# Initial states
# log_initial_states=1Configure Alignak notificationsAs explained previously the alignak notifications pack needs to be configured for sending out the mail notifications. This demo configuration is using default parameters for the mail server that may be adapted to your own configuration.With the default parameters, you will have some WARNING logs in theschedulerd.logfile, such as:[2017-01-07 10:00:47 CET] WARNING: [alignak.scheduler] The notification command '/usr/local/var/libexec/alignak/notify_by_email.py -t service -S localhost -ST 25 -SL your_smtp_login -SP your_smtp_password -fh -to guest@localhost -fr alignak@monitoring -nt PROBLEM -hn "alignak_glpi" -ha 127.0.0.1 -sn "Disk /var" -s CRITICAL -ls UNKNOWN -o "NRPE: Command 'check_var' not defined" -dt 0 -db "1483779644.85" -i 2 -p ""' raised an error (exit code=1): 'Traceback (most recent call last):'To configure the Alignak mail notifications, edit the/usr/local/etc/alignak/arbiter/packs/resource.d/notifications.cfgfile and set the proper parameters for your configuration:#-- SMTP server configuration
$SMTP_SERVER$=localhost
$SMTP_PORT$=25
$SMTP_LOGIN$=your_smtp_login
$SMTP_PASSWORD$=your_smtp_password
# -- Mail configuration
[email protected] may also adapt the contacts used in this demo configuration else WE will receive you notification mails :). the used contacts are defined as is:[email protected], as the administrator contact for the realm [email protected], as the administrator contact for the realm [email protected], as the administrator contact for the realm SouthYou will find their definition in the/usr/local/etc/arbiter/realmsfolder, in each realm (All, North,…)contactssub-folder.Use Alignak Web servicesThe alignak Web Services module exposes some Web Services on the port 8888.Get the Alignak daemons status:http://127.0.0.1:8888/alignak_mapNotethat the default configuration requires an HTTP authorized access with a basic HTTP authorization from a user existing in the alignak backend. You can disable this in themod-ws.cfgfile, else usecurlwith this syntax:$ curl -H "Content-Type: application/json" -X GET -d '{"username":"admin","password":"admin"}' http://127.0.0.1:8888/alignak_mapFor more information about the Alignak available services, please see theAlignak Web Services online documentation.7. Configure/run Alignak Web UIAs of now, your configuration is monitored and you will receive notifications when something is detected as faulty. Everything is under control but why missing having an eye on what’s happening in your system with a more sexy interface than tailing a log file and reading emails?Install the Alignak Web User Interface:# Alignak WebUI
sudo pip install alignak-webuiThe default installation is suitable for this demonstration but you may update the(/usr/local)/etc/alignak-webui/settings.cfgconfiguration file to adapt this default configuration.Run the Alignak WebUI:cd ~/demo
# Detach a screen session identified as "alignak-webui"
./alignak_webui_start.sh
# This will run the alignak-webui-uwsgi in a screen session. If you do not mind about a
# WebUI screen, you should run: alignak-webui-uwsgi
ps -aux | grep uwsgi
root 26312 0.0 0.0 17096 2076 13 I+J 10:23AM 0:00.00 /bin/sh /usr/local/bin/alignak-webui-uwsgi
root 26313 0.0 0.2 157324 38204 13 S+J 10:23AM 0:01.32 uwsgi --ini /usr/local/etc/alignak-webui/uwsgi.ini
root 26318 0.0 0.4 178952 64724 13 S+J 10:23AM 0:20.76 uwsgi --ini /usr/local/etc/alignak-webui/uwsgi.ini
root 26319 0.0 0.4 181512 68360 13 S+J 10:23AM 0:28.29 uwsgi --ini /usr/local/etc/alignak-webui/uwsgi.ini
root 26320 0.0 0.5 203016 86876 13 S+J 10:23AM 1:00.70 uwsgi --ini /usr/local/etc/alignak-webui/uwsgi.ini
root 26321 0.0 0.7 227336 111520 13 S+J 10:23AM 1:45.06 uwsgi --ini /usr/local/etc/alignak-webui/uwsgi.ini
# Joining the webui screen is 'screen -r alignak-webui'
# Ctrl+C in the screen will stop the WebUI
# kill -SIGTERM `cat /tmp/alignak-webui.pid`
# The alignak webui writes some logs as a Web server does
tail -f /usr/local/var/log/alignak-webui-error.log
tail -f /usr/local/var/log/alignak-webui-access.logUse your Web browser to navigate tohttp://127.0.0.1:5001and log in withadmin/admin.To use the WebUI from another machine (eg. if you are using a virtual machine), you can set a fake local loop:ssh -L 5001:127.0.0.1:5001 login@ip_vm_testThe alignak WebUI runs thanks to uWSGI and its configuration is available in the/usr/local/alignak-webui/uwsgi.iniwhere you can define the log files location. You can also configure the Alignak WebUI to send its internal metrics to a Graphite timeseries database.Notethat a Grafana dashboard for the Alignak WebUI is available in the/usr/local/etc/alignak/sample/grafanadirectory created when you installed the alignak-demo package;)8. Configure/run Alignak desktop appletExcept when you are in Big Brother mode, you almost always do not need a full Web interface as the one provided by the Alignak WebUI. This is why Alignak provides a desktop applet available for Linux and Windows desktops.Install the Alignak App:# For Linux users with python2
sudo apt-get install python-qt4
# For Linux and Windows users with python3
pip3 install PyQt5 --user
# For Windows users, we recommend using python3, else install PyQt from the download page.
# Otherwise, you can find a Windows installer on repository, with all packages inside, to run it.
# Alignak App
pip install alignak_app --user
# As of now, the last version is not yet pip installable, so we:
git clone https://github.com/Alignak-monitoring-contrib/alignak-app
cd alignak-app
pip install . --user
# Linux: Run the app (1st run)
$HOME/.local/alignak_app/alignak-app start
# Then you will be able for next runs to
alignak-app start
# Windows: Run the app
python "%APPDATA%\Python\alignak_app\bin\alignak-app.py
# If you used the Windows installer, just run the desktop shortcut "Alignak-app"The applet will require a username and a password that are the same os the one used for the Web UI (useadmin/admin). Click on the Alignak icon in the desktop toolbar to activate the Alignak-app features: alignak status, host synthesis view, host/services states, …A notification popup will appear if something changed in the hosts / services states existing in the Alignak backend.The default configuration is suitable for this demonstration but you may update thesettings.cfgconfiguration file that is largely commented. On Linux, this file is located under$HOME/.local/alignak_app/folder. On Windows, configuration file can be found under%APPDATA%Pythonalignak_app* or *%PROGRAMFILES%Alignak-appif you run installer.9. Configure Alignak backend for timeseriesThe Alignak backend allows to send collected performance data to a timeseries database. It must be configured to know where to send the timeseries data.Note: Using StatsD as a front-end to the Graphite Carbon collector is not mandatory but it will help to have more regular statistics and it will maintain a metrics cache. But the purpose of this doc is not to discuss about the benefits / drawbacks of StatsD…Using the Alignak WebUI makes it really easy to configure. Navigate to the Web UI Alignak backend menu and select theBackend Grafanaitem. Enter edition mode and add a new item. Also create a new Graphite item related to the Grafana item you just created, and that’s it …You can also use command line scripts to create such information in the Alignak backend. Using thealignak-backend-clientscript makes it easy to configure this:cd ~/demo
# Get the example configuration files
cp /usr/local/etc/alignak/sample/backend/* ~/demoIf youdo notintend to use the StatsD daemon, execute these commands:# Use Alignak backend CLI to add a Grafana instance
alignak-backend-cli -v add -t grafana --data=example_grafana.json grafana_demo
# Use Alignak backend to add a Graphite instance
alignak-backend-cli -v add -t graphite --data=example_graphite.json graphite_demoIf youdointend to use the StatsD daemon, execute these commands:# Use Alignak backend CLI to add a Grafana instance
alignak-backend-cli -v add -t grafana --data=example_grafana.json grafana_demo
# Use Alignak backend CLI to add a StatsD instance
alignak-backend-cli -v add -t statsd --data=example_statsd.json statsd_demo
# Use Alignak backend to add a Graphite instance
alignak-backend-cli -v add -t graphite --data=example_graphite_statsd.json graphite_demoYou can edit theexample_.json* provided files to include your own Graphite / Grafana (or InfluxDB) parameters. For more information see theAlignak backend documentation.Warning: It will be mandatory to update the Grafana configuration with your own Grafana API key else the backend will not be able to create the Grafana dashboards and panels automatically!Note:alignak-backend-cliis coming with the installation of the Alignak backend client.10. UpgradingSome updates are regularly pushed on the different alignak repositories and then you will sometime need to update this demo configuration. Before upgrading the application you should stop Alignak:cd ~/demo
# Stop all alignak processes
./alignak_demo_stop.sh
# Check everything is stopped
ps -ef | grep alignak-
# Kill remaining processes. It may happen on a demo server;)
pkill alignak-brokerTo upgrade Alignak, you can:cd ~/repos/alignak
# Get the last develop version
git pull
# Install alignak and all its python dependencies
# -v will activate the verbose mode of pip
sudo pip install -v .
# Create alignak user/group and set correct permissions on installed configuration files
sudo ./dev/set_permissions.shTo upgrade all the alignak packages that were installed, you can:pip install -U pip list | grep alignak | awk '{ print $1}'To list the currently installed packages and to know if they are up-to-date, you can use this command:pip list --outdated | grep alignakTo 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.txtand to update:pip install -r alignak-update.txtWhat we see?Monitored system statusTheAlignak Web UIrunning on our demo server allows to view the monitored system status. Have a look here:http://demo.alignak.net. Several login may be used depending on the user role:admin / admin, to get logged-in as an Administrator. You will see all the hosts and will be able to execute some commands (acknowledge a problem, schedule a downtime,…)northman / north, to get logged-in as a power user in the North realm. You will see all the hosts of the All and North realms and will be able to execute commands.southman / south, to get logged-in as a power user in the South realm. You will see all the hosts of the All and South realms and will be able to execute commands.Alignak internal metricsAlignak maintains its own internal metrics and it is able to send them to aStatsD server. Install the StatsD server locally (as explained later in this document) and update thealignak.cfgconfiguration file to enable this feature:# Export all alignak inner performances into a statsd server.
# By default at localhost:8125 (UDP) with the alignak prefix
# Default is not enabled
statsd_host=localhost
#statsd_port=8125
statsd_prefix=alignak
statsd_enabled=1We are running ademo Grafana serverthat allows to see the Alignak internal metrics. Several dashboards are available:Alignak internal metricsshows the statistics provided by Alignak. This sample dashboard is available in the Alignak repository,contribfolder.Graphite serverreports on Carbon/Graphite own monitoring. This dashboard is available from the Grafana.net web site.Installing StatsD / Graphite / GrafanaNOTEthis section is a draft chapter. Currently the installatin described here is not fully functional !StatsDInstall node.js on your server according to the recommended installation process.On FreeBSD:pkg install nodeOn Ubuntu / Debian:# For Node.js 6
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejsTo get the most recent StatsD (if you distro packaging do not provide it, you must clone the git repository:$ cd ~
$ git clone https://github.com/etsy/statsd
$ cd statsd
# Create an alignak.js file with the following content (for a localhost Graphite)
$ cp exampleConfig.js alignak.js
$ cat alignak.js
{
graphitePort: 2003
, graphiteHost: "127.0.0.1"
, port: 8125
, backends: [ "./backends/graphite" ]
/* Do not use any StatsD metric hierarchy */
, graphite: {
/* Do not use legacy namespace */
legacyNamespace: false
/* Set a global prefix */
, globalPrefix: "alignak-statsd"
/* Set empty prefixes */
, prefixCounter: ""
, prefixTimer: ""
, prefixGauge: ""
, prefixSet: ""
/* Do not set any global suffix
, globalSuffix: "_"
*/
}
}
# Start the StatsD daemon in a screen
$ screen -S statsd
$ node stats.js alignak.js
# And leave the screen...
$ Ctrl+AD
# Test StatsD
$ ll /var/lib/graphite/whisper/alignak-statsd/statsd/
total 84
drwxr-xr-x 6 _graphite _graphite 4096 févr. 2 20:11 ./
drwxr-xr-x 3 _graphite _graphite 4096 févr. 2 20:11 ../
drwxr-xr-x 2 _graphite _graphite 4096 févr. 2 20:11 bad_lines_seen/
drwxr-xr-x 2 _graphite _graphite 4096 févr. 2 20:11 graphiteStats/
drwxr-xr-x 2 _graphite _graphite 4096 févr. 2 20:11 metrics_received/
-rw-r--r-- 1 _graphite _graphite 17308 févr. 2 20:12 numStats.wsp
drwxr-xr-x 2 _graphite _graphite 4096 févr. 2 20:11 packets_received/
-rw-r--r-- 1 _graphite _graphite 17308 févr. 2 20:12 processing_time.wsp
-rw-r--r-- 1 _graphite _graphite 17308 févr. 2 20:12 timestamp_lag.wspAs of now you have a running StatsD daemon that will collect the Alignak internal metrics to feed Graphite.Graphite Carbon$ sudo su
$ apt-get update
# Set TZ as UTC
$ dpkg-reconfigure tzdata
=> UTC
# Install Carbon
$ apt-get install graphite-carbon
# Configure Carbon
$ vi /etc/default/graphite-carbon
# Enable carbon service on boot
=> CARBON_CACHE_ENABLED=true
# Configuration file
$ vi /etc/carbon/carbon.conf
# Enable log rotation
=> ENABLE_LOGROTATION = True
# Aggregation configuration (default is suitable...)
$ cp /usr/share/doc/graphite-carbon/examples/storage-aggregation.conf.example /etc/carbon/storage-aggregation.conf
# Start the metrics collector service (Carbon)
$ service carbon-cache start
# Monitor activity
$ tail -f /var/log/carbon/console.log
# Test carbon (send a metric test.count)
$ echo "test.count 4 `date +%s`" | nc -q0 127.0.0.1 2003
$ ls /var/lib/graphite/whisper
=> test/count.wspGraphite APINo need for the Graphite Web application, we will use Grafana ;)$ sudo su
# Install Graphite-API
##### $ apt-get install graphite-api; do not seem to survive a system restart :)
$ wget https://github.com/brutasse/graphite-api/releases/download/1.1.2/graphite-api_1.1.2-1447943657-ubuntu14.04_amd64.deb
$ dpkg -i
# Install Nginx / uWsgi
$ apt-get install nginx uwsgi uwsgi-plugin-python
# Configure uWsgi
$ vi /etc/uwsgi/apps-available/graphite-api.ini
[uwsgi]
processes = 2
socket = localhost:8080
plugins = python27
module = graphite_api.app:app
buffer = 65536
$ ln -s /etc/uwsgi/apps-available/graphite-api.ini /etc/uwsgi/apps-enabled
$ service uwsgi restart
# Configure nginx
$ vi /etc/nginx/sites-available/graphite.conf
server {
listen 80;
location / {
include uwsgi_params;
uwsgi_pass localhost:8080;
}
}
$ ln -s /etc/nginx/sites-available/graphite.conf /etc/nginx/sites-enabled
$ service nginx restartStatsDTo be completed !Grafana# Install Grafana (Version 4 only supported by the Alignak backend!)
wget https://grafanarel.s3.amazonaws.com/builds/grafana_3.1.1-1470047149_amd64.deb
apt-get install -y adduser libfontconfig
dpkg -i grafana_3.1.1-1470047149_amd64.deb
# Configure Grafana (not necessary...)
$ vi /etc/grafana/grafana.ini
$ service grafana-server start
# Open your web browser on http://127.0.0.1:3000
|
alignak-mod-surveil-config
|
No description available on PyPI.
|
alignak_module_backend
|
Alignak modules for the Alignak BackendInstallationThe installation of this module will copy some configuration files in the Alignak default configuration directory (eg./usr/local/etc/alignak). The copied files are located in the default sub-directory used for the modules (eg.arbiter/modules).From PyPITo install the module from PyPI:sudo pip install alignak-module-backendFrom source filesTo install the module from the source files (for developing purpose):git clone https://github.com/Alignak-monitoring-contrib/alignak-module-backend
cd alignak-module-backend
sudo pip install . -eNote:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)Short descriptionThis meta-module for Alignak contains 3 modules:Arbiter module, which features are:get configuration from Alignak backendmanages acknowledgements, downtimes schedule and re-checksScheduler module, which features are:manage retention (load and save)Broker module, which features are:update live state of hosts and services in the Alignak backendupdate log for hosts and services checks in the Alignak backendConfigurationEach module has its own configuration file and its configuration parameters.
The configuration files are documented to help setting the right configuration.Arbiter module:configure the Alignak backend connection (url and login)configure periodical configuration modification checkconfigure periodical required actions (ack, downtime, …)Scheduler module:configure the Alignak backend connection (url and login)Broker module:configure the Alignak backend connection (url and login)Bugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak_module_EXAMPLE
|
Alignak Example Module======================*Alignak example module*.. image:: https://travis-ci.org/Alignak-monitoring-contrib/alignak-module-example.svg?branch=develop:target: https://travis-ci.org/Alignak-monitoring-contrib/alignak-module-example:alt: Develop branch build status.. image:: https://landscape.io/github/Alignak-monitoring-contrib/alignak-module-example/develop/landscape.svg?style=flat:target: https://landscape.io/github/Alignak-monitoring-contrib/alignak-module-example/develop:alt: Development code static analysis.. image:: https://coveralls.io/repos/Alignak-monitoring-contrib/alignak-module-example/badge.svg?branch=develop:target: https://coveralls.io/r/Alignak-monitoring-contrib/alignak-module-example:alt: Development code tests coverage.. image:: https://badge.fury.io/py/alignak_module_example.svg:target: https://badge.fury.io/py/alignak-module-example:alt: Most recent PyPi version.. image:: https://img.shields.io/badge/IRC-%23alignak-1e72ff.svg?style=flat:target: http://webchat.freenode.net/?channels=%23alignak:alt: Join the chat #alignak on freenode.net.. image:: https://img.shields.io/badge/License-AGPL%20v3-blue.svg:target: http://www.gnu.org/licenses/agpl-3.0:alt: License AGPL v3Short description-----------------This module is an example skeleton to build Alignak modules ...Packaging---------Features and known issues~~~~~~~~~~~~~~~~~~~~~~~~~Modules can be attached to an Alignak daemon thanks to the daemon configuration file. The module defines, in its own properties which daemon it may be attached to and the module documentation will informe the user about this.Rather than Shinken, a module cannot have sub-modules. This feature is not currently well tested and robust enough :) If you really need this feature get in touch with us to discuss the matter.Modules types~~~~~~~~~~~~~Alignak attributes a type to each module that is installed. The idea behind the module type is that it is possible to have several existing modules for the same feature. The current modules types:* retention, for a module that saves and reloads livestate data between each system restart* livestate, for a module that will register the current system state (hosts, services states, ...)* configuration, for a module that will provide the monitored objects to the Alignak arbiter* passive, for a module that will collect passive checks results (NSCA, ...)* logs, for a module that will collect monitoring logs* action, for a module that will execute some actions (acknownledge, downtime, ...)* poller, for a module that will execute checks in a pollerOld Nagios parameters require that some external modules are installed for the corresponding features to be available. The Arbiter will alert if some features are activated and the corresponding modules are not available in the loaded monitoring configuration.Repositories~~~~~~~~~~~~All Alignak modules are stored in their own repository in the `Alignak monitoring contrib`_ Github organization.Repository example~~~~~~~~~~~~~~~~~~Repository directories and files example::README.rstLICENCEAUTHORSrequirements.txtsetup.pyversion.pyalignak_module_EXAMPLE/etc/arbiter/modules/mod-EXAMPLE.cfg__init__.pyEXAMPLE.pyThe content of the directory ``alignak_checks_EXAMPLE/etc`` (including files and sub directories) will be copied to */usr/local/var/etc/alignak*.Building~~~~~~~~To build a new module EXAMPLE2:* create a new ``alignak-module-EXAMPLE2`` repository which is a copy of this repository* rename the ``alignak_module_EXAMPLE`` directory to ``alignak_module_EXAMPLE2``* update the ``version.py`` file* edit the ``__pkg_name__`` and the ``module_type`` variables* update the ``MANIFEST.in`` file* rename the ``alignak_module_EXAMPLE`` directory to ``alignak_module_EXAMPLE2``* update the ``README.rst`` file* remove this section **Packaging*** search and replace ``EXAMPLE`` with ``EXAMPLE2``* complete the **Documentation** chapter* update the ``version.py`` file with all the package information* ``__module_type__`` will be used to complete the keywords in PyPI and as the sub-directory to store the pack's files* the file docstring will be used as the package description in PyPI* update the ``setup.py`` file (**not recommended**)* ``setup.py`` should not be modified for most of the modules ... if necessary, do it with much care!The ``example.py`` contains all the possible methods that are to be used in the different daemon types. Remove unuseful functions and adapt the remaining ones to your needs. And that's it!.. note: If you create an external broker module, do not forget to uncomment the 'main' function :)Then, to build and make your module available to the community, you must use the standard Python setuptools:* run ``setup.py register -r pypi`` to register the new package near PyPI* run ``setup.py sdist -r pypi`` to build the package* run ``sudo pip install . -e`` to make the package installed locally (development mode)* run ``sudo pip uninstall -v . -e`` to remove the development mode* run ``sudo pip install . -v`` to make the package installed locally* run ``sudo pip uninstall -v alignak_module_EXAMPLE`` to uninstall the packageWhen your package is ready and functional:* run ``python setup.py sdist upload -r pypi`` to upload the package to `PyPI repository`_.**Note**: every time you upload a package to PyPI you will need to change the module version in the ``version.py`` file.Under this line, keep the content for the new built package. Remove the former *Packaging* section of this document.-----Installation------------The installation of this module will copy some configuration files in the Alignak default configuration directory (eg. */usr/local/etc/alignak*). The copied files are located in the default sub-directory used for the modules (eg. *arbiter/modules*).From PyPI~~~~~~~~~To install the module from PyPI:::sudo pip install alignak-module-exampleFrom source files~~~~~~~~~~~~~~~~~To install the module from the source files (for developing purpose):::git clone https://github.com/Alignak-monitoring-contrib/alignak-module-examplecd alignak-module-examplesudo pip install . -e**Note:** *using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)*Configuration-------------Once installed, this module has its own configuration file in the */usr/local/etc/alignak/arbiter/modules* directory.The default configuration file is *mod-example.cfg*. This file is commented to help configure all the parameters.To configure an Alignak daemon to use this module:- edit your daemon configuration file- add your module alias value (`example`) to the `modules` parameter of the daemonTo set up several instances of the same module:- copy the default configuration to another file,- update the module alias parameter (`example_bis`)- edit your daemon configuration file- add the new `module_alias` parameter value (`example_bis`) to the `modules` parameter of the daemonBugs, issues and contributing-----------------------------Contributions to this project are welcome and encouraged ... `issues in the project repository <https://github.com/alignak-monitoring-contrib/alignak-module-example/issues>`_ are the common way to raise an information.
|
alignak_module_external_commands
|
Alignak external commands moduleShort descriptionThis module for Alignak opens a commands file as a named pipe and regularly reads the content of this file to interpret as external commands that are forwarded to the Alignak framework.InstallationThe installation of this module will copy some configuration files in the Alignak default configuration directory (eg./usr/local/etc/alignak). The copied files are located in the default sub-directory used for the modules (eg.arbiter/modules).From PyPITo install the module from PyPI:sudo pip install alignak-module-external-commandsFrom source filesTo install the module from the source files (for developing purpose):git clone https://github.com/Alignak-monitoring-contrib/alignak-module-external-commands
cd alignak-module-external-commands
sudo pip install . -eNote:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)ConfigurationOnce installed, this module has its own configuration file in the/usr/local/etc/alignak/arbiter/modulesdirectory.
The default configuration file ismod-external-commands.cfg. This file is commented to help configure all the parameters.To configure an Alignak daemon to use this module:edit your daemon configuration fileadd your module alias value (external-commands) to themodulesparameter of the daemonBugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak_module_logs
|
Alignak module for the monitoring logsInstallationThe installation of this module will copy some configuration files in the Alignak default configuration directory (eg./usr/local/etc/alignak). The copied files are located in the default sub-directory used for the modules (eg.arbiter/modules).From PyPITo install the module from PyPI:sudo pip install alignak-module-logsFrom source filesTo install the module from the source files (for developing purpose):git clone https://github.com/Alignak-monitoring-contrib/alignak-module-logs
cd alignak-module-logs
sudo pip install . -eNote:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)Short descriptionThis module for Alignak collects the monitoring logs (alerts, notifications, …) to log them into a dedicated file.You can plainly use the powerful of the Python logging system thanks to the use of a logging configuration file which will allow you to define when, where and how to send the monitoring logs ….Known issuesThis module is not compatible with Python 2.6 if you intend to use a logger configuration file as this feature is not available before Python 2.7 version.
If you are still using the old 2.6 version, upgrade or define the logger parameters in the module configuration file.ConfigurationOnce installed, this module has its own configuration file in the/usr/local/etc/alignak/arbiter/modulesdirectory.
The default configuration file ismod-logs.cfg. This file is commented to help configure all the parameters.To configure Alignak broker to use this module:edit your broker daemon configuration fileadd themodule_aliasparameter value (logs) to themodulesparameter of the daemonTo configure this module to send its log to the Alignak backend:edit the module configuration file to set the Alignak backend parameters (eg. url and login information)To set up several logs collectors:copy the default configuration to another file,change the module alias parameter (logs_bis)edit your broker daemon configuration fileadd the newmodule_aliasparameter value (logs_bis) to themodulesparameter of the daemonTo set up your own logger:edit the module configuration file to uncomment thelogger_configurationvariableupdate the logger configuration file (eg. mod-logs-logger.json) to replaceALIGNAKLOGwith your target log directoryupdate the logger configuration file to suit your needs … then python logger on the Internet is your best friend :)Monitoring logs configurationAs a default configuration this module will create a log file for the monitoring logs. This file will be located in the alignak log directory and it will be rotated every day for a period of 365 days. You can also define your own logging strategy as it is explained in the module configuration file that is largely commented to explain how to configure.Bugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak-module-mongo-logs
|
Notethat this module is only useful to get the Alignak monitoring logs in a Mongo DB if you do not use the Alignak backendAlignak module for the monitoring logsInstallationThe installation of this module will copy some configuration files in the Alignak default configuration directory (eg./usr/local/etc/alignak). The copied files are located in the default sub-directory used for the modules (eg.arbiter/modules).From PyPITo install the module from PyPI:sudo pip install alignak-module-mongo-logsFrom source filesTo install the module from the source files (for developing purpose):git clone https://github.com/Alignak-monitoring-contrib/alignak-module-mongo-logs
cd alignak-module-mongo-logs
sudo pip install . -eShort descriptionThis module for Alignak collects the monitoring logs (alerts, notifications, …) to log them into a collection of a Mongo DB.This module was back-ported from the Shinkenmod-mongo-logsbut it does not manage the availability for hosts and services.ConfigurationOnce installed, this module has its own configuration file in the/usr/local/etc/alignak/arbiter/modulesdirectory.
The default configuration file ismod-mongo-logs.cfg. This file is commented to help configure all the parameters.To configure Alignak broker to use this module:edit your broker daemon configuration fileadd themodule_aliasparameter value (logs) to themodulesparameter of the daemonTo configure this module for Mongo DB:edit the module configuration file to set the MongoDB parametersMetricsThis module is able to push metrics to an external TSDB (Graphite, InfluxDB). Configure the metrics parameters in the configuration:; --------------------------------------------------------------------
; Module internal metrics
; Export module metrics to a statsd server.
; By default at localhost:8125 (UDP) with the alignak prefix
; Default is not enabled
; --------------------------------------------------------------------
;statsd_host = localhost
; For StatsD
;statsd_port = 8125
; For Graphite
;statsd_port = 2004
; Default
;statsd_prefix=alignak
; Use this prefix to use the alignak name in the metrics hierarchy
;statsd_prefix=%(alignak_name)s.modules
; Default is disabled
;statsd_enabled = 0
;graphite_enabled = 0
; --------------------------------------------------------------------Available metrics:committed-logscounts the DB commited logsmonitoring-event-got.%scounts the detected eventsmonitoring-event-ignored.%scounts the ignored events (not DB commited)queue-sizeis the module message queue size. If greater than 1, it indicates a module overload because the queue should be emptied on each loop turnmanaged-broks-timeis the broks management duration on each loop turnNotethat only the events in this list are DB commited: [‘TIMEPERIOD TRANSITION’, ‘RETENTION LOAD’, ‘RETENTION SAVE’, ‘CURRENT STATE’, ‘NOTIFICATION’, ‘ALERT’, ‘DOWNTIME’, ‘FLAPPING’, ‘ACTIVE CHECK’, ‘PASSIVE CHECK’, ‘COMMENT’, ‘ACKNOWLEDGE’, ‘DOWNTIME’]An example Grafana dashboard:Bugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak-module-nrpe-booster
|
Alignak NRPE booster Module===========================**Note** that this module is not yet tested with the most recent (> 2) version of Alignak.-----*Alignak NRPE booster module*.. image:: https://travis-ci.org/Alignak-monitoring-contrib/alignak-module-nrpe-booster.svg?branch=develop:target: https://travis-ci.org/Alignak-monitoring-contrib/alignak-module-nrpe-booster:alt: Develop branch build status.. image:: https://landscape.io/github/Alignak-monitoring-contrib/alignak-module-nrpe-booster/develop/landscape.svg?style=flat:target: https://landscape.io/github/Alignak-monitoring-contrib/alignak-module-nrpe-booster/develop:alt: Development code static analysis.. image:: https://coveralls.io/repos/Alignak-monitoring-contrib/alignak-module-nrpe-booster/badge.svg?branch=develop:target: https://coveralls.io/r/Alignak-monitoring-contrib/alignak-module-nrpe-booster:alt: Development code tests coverage.. image:: https://badge.fury.io/py/alignak_module_backend.svg:target: https://badge.fury.io/py/alignak-module-nrpe-booster:alt: Most recent PyPi version.. image:: https://img.shields.io/badge/IRC-%23alignak-1e72ff.svg?style=flat:target: http://webchat.freenode.net/?channels=%23alignak:alt: Join the chat #alignak on freenode.net.. image:: https://img.shields.io/badge/License-AGPL%20v3-blue.svg:target: http://www.gnu.org/licenses/agpl-3.0:alt: License AGPL v3Installation------------The installation of this module will copy some configuration files in the Alignak default configuration directory (eg. */usr/local/etc/alignak*). The copied files are located in the default sub-directory used for the modules (eg. *arbiter/modules*).From PyPI~~~~~~~~~To install the module from PyPI:::sudo pip install alignak-module-nrpe-boosterFrom source files~~~~~~~~~~~~~~~~~To install the module from the source files (for developing purpose):::git clone https://github.com/Alignak-monitoring-contrib/alignak-module-nrpe-boostercd alignak-module-nrpe-boostersudo pip install . -e**Note:** *using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)*Short description-----------------This module allows Alignak Pollers to bypass the launch of the `check_nrpe` process. This allow to use NRPE checks without the need to install the Nagios NRPE plugin.This module reads the check command and opens the connection by itself. It scales the use of NRPE for active monitoring of servers hosting NRPE agents.Installation------------Requirements~~~~~~~~~~~~To use NRPE/SSL install `pyOpenssl` Python wrapper module with the OpenSSL library.Configuration-------------Once installed, this module has its own configuration file in the */usr/local/etc/alignak/arbiter/modules* directory.The default configuration file is *mod-nrpe-booster.cfg*. No configuration is necessary for this module.Configure an Alignak poller to use this module:- edit your poller daemon configuration file- add the `module_alias` parameter value (`nrpe_booster`) to the `modules` parameter of the daemonTag the NRPE commands with the `module_type` parameter. This parameter must be the `module_alias` of the installed module::define command {command_name check_nrpecommand_line $USER1$/check_nrpe -H $HOSTADRESS$ -c $ARG1$ -a $ARG2$module_type nrpe-booster}Bugs, issues and contributing-----------------------------Contributions to this project are welcome and encouraged ... `issues in the project repository <https://github.com/alignak-monitoring-contrib/alignak-module-nrpe-booster/issues>`_ are the common way to raise an information.
|
alignak_module_nsca
|
Alignak NSCA module for the Alignak ReceiverInstallationThe installation of this module will copy some configuration files in the Alignak default configuration directory (eg./usr/local/etc/alignak). The copied files are located in the default sub-directory used for the modules (eg.arbiter/modules).From Alignak packages repositoriesMore information in theonline Alignak documentation. Here is only an abstract…Debian:# Alignak DEB stable packages
sudo echo deb https://dl.bintray.com/alignak/alignak-deb-stable xenial main | sudo tee -a /etc/apt/sources.list.d/alignak.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv D401AB61
sudo apt-get update
sudo apt install python-alignak-module-nscaCentOS:sudo vi /etc/yum.repos.d/alignak-stable.repo:
[Alignak-rpm-stable]
name=Alignak RPM stable packages
baseurl=https://dl.bintray.com/alignak/alignak-rpm-stable
gpgcheck=0
repo_gpgcheck=0
enabled=1
sudo yum repolist
sudo yum install python-alignak-module-nscaFrom PyPITo install the module from PyPI:sudo pip install alignak-module-nscaFrom source filesTo install the module from the source files (for developing purpose):git clone https://github.com/Alignak-monitoring-contrib/alignak-module-nsca
cd alignak-module-nsca
sudo pip install . -eNote:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)Short descriptionThis module for Alignak receiver reads and decodes NSCA passive notifications to dispatch them into the Alignak framework.Features / Known limitationsHandles NSCA version 3 protocolCheck the NSCA packet timestamp for staled data (older than a certain amount of time) or ‘future’ data (future timestamp).Consider thehost_checkservice received data as a passive host check. Useful if your NSCA client does not handle correctly the passive host check syntax ;)The NSCA module implementation is currently limited to the “xor” obfuscation/encryption.NoteTo make the module add some information in the daemon log file, define theALIGNAK_LOG_ACTIONSenvironment variable. It will dump a part of the received NSCA packets…ConfigurationOnce installed, this module has its own configuration file in the/usr/local/share/alignak/etc/alignak.ddirectory.
The default configuration file isalignak-module-nsca.ini. This file is commented to help configure all the parameters.The default configuration is convenient for ‘recent’ NSCA client implementing NSCA version 3.This configuration has been tested with Linux send_nsca 2.9.1 and Windows NSClient most recent versions (from 0.4.1).Notereceived NSCA packets which are not containing version 3 information are dropped by the module!To configure Alignak receiver to use this module:edit your receiver daemon configuration fileadd themodule_aliasparameter value (nsca) to themodulesparameter of the daemonTo set up several NSCA listeners:copy the default configuration to another file,change the module alias parameter (nsca_bis)change the listening portedit your receiver daemon configuration fileadd the newmodule_aliasparameter value (nsca_bis) to themodulesparameter of the daemonBugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak_module_ws
|
Alignak Web services moduleImportant informationThis module exposes some Web services as a REST API for the Alignak monitoring framework. Indeed it extends the Alignak receiver existing API with some external new services such as: report an host/service check result, send a command to alignak, get information from Alignak, …It is important to consider that the services exposed by this module currently implement a very first version developed as a Proof of Concept and that they may be refactored without any ascending compatibility.If you intend to use the current interface feel free to get in touch and we will keep you informed about the current actions and decisions ;)InstallationThe installation of this module will copy some configuration files in the Alignak default configuration directory (eg./usr/local/etc/alignak). The copied files are located in the default sub-directory used for the modules (eg.arbiter/modules).From PyPITo install the module from PyPI:sudo pip install alignak-module-wsFrom source filesTo install the module from the source files (for developing purpose):git clone https://github.com/Alignak-monitoring-contrib/alignak-module-ws
cd alignak-module-ws
sudo pip install . -eNote:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)Short descriptionThis module for Alignak exposes some Alignak Web Services:GET /will return the list of the available endpointsGET /alignak_mapthat will return the map and status of all the Alignak running daemonsGET /hostto get an host informationGET /hostgroupto get an hostgroup informationGET /alignak_logsto view the Alignak events history from an Alignak backendPOST /alignak_commandthat will notify an external command to the Alignak frameworkPATCH /host/<host_name>that allows to send live state for an host and its services, update host custom variables, enable/disable host checksConfigurationOnce installed, this module has its own configuration file in the/usr/local/etc/alignak/arbiter/modulesdirectory.
The default configuration file ismod-ws.cfg. This file is commented to help configure all the parameters.To configure an Alignak daemon (receiveris the recommended daemon) to use this module:edit your daemon configuration file (eg.receiver-master.cfg)add your module alias value (web-services) to themodulesparameter of the daemonNotethat currently the SSL part of this module has not yet been tested!DocumentationAlignak Web Service module hasan online documentation page.Click on one of the docs badges on this page to browse the documentation.Bugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
alignak_notifications
|
Alignak package for notifications (simple mail, HTML mail, XMPP)InstallationThe installation of this package will copy some configuration files in the Alignak default configuration directory (eg./usr/local/etc/alignak). The copied files are located in the default sub-directory used for the packs (eg.arbiter/packs).It will also copy some JSON files in the/usr/local/etc/alignak/backend-jsondirectory. These files are usable to import all the commands tinto the Alignak backend with thealignak-backend-cliscript installed with the backend client library.You can update the sipped files to make the default commands suit your needs or use the default commands configuration that is defined to be as complete as possible.Note:The python scripts assume that you have a directpythonrunnable … if you need to usepython2.7or something else to run python, you should:cd /usr/local/bin
ln -s python2.7 pythonFrom PyPITo install the package from PyPI:sudo pip install alignak-notificationsFrom source filesTo install the package from the source files:git clone https://github.com/Alignak-monitoring-contrib/alignak-notifications
cd alignak-checks-notifications
sudo pip install .Note:using `sudo python setup.py install` will not correctly manage the package configuration files! The recommended way is really to use `pip`;)DocumentationThis pack embeds several scripts that can be used to send notifications from Alignak:simple printf sent to sendmailpython script to send HTML mailpython script to post messages to a Slack channelImportant:The HTML mail and Slack scripts are using Alignak logo images in the message composition. The default used files are located in the main directory of the project repository. Alternative images URL can be specified in the notification command parameters.Configuration (Slack notifications)A Slack API token is mandatory to post messages to a slack channel. The token can be provided on the command line of the notification script or defined in an environment variable (ALIGNAK_SLACK_API_TOKEN).The Slack channel that will receive the messages must ne named as the configured contact name. Let’s say that you want to send the notifications message to a channel named#my_alignak, the contact configured but be named asmy-alignak.Configuration (mail notifications)Edit the/usr/local/etc/alignak/arbiter/packs/resource.d/notifications.cfgfile and configure
the SMTP server address, port, user name and password.#-- SMTP server configuration
$SMTP_SERVER$=your_smtp_server_address
$SMTP_PORT$=25
$SMTP_LOGIN$=your_smtp_login
$SMTP_PASSWORD$=your_smtp_passwordBugs, issues and contributingContributions to this project are welcome and encouraged …issues in the project repositoryare the common way to raise an information.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.