<commit_before>
= Zabbix Slack AlertScript =

I got a chance to write this custom Zabbix alert script for work to have Zabbix send alerts to a channel on our [https://slack.com/ Slack.com] account and could not find any already existing or similar scripts. However, this script likely only works with Zabbix 2.0 or greater - it has not been tested with Zabbix 1.8 or earlier.

The "slack.sh" script needs to be placed in the "AlertScriptsPath" directory that is specified within the Zabbix servers' configuration file (zabbix_server.conf) and must be executable by the user (usually "zabbix") running the zabbix_server binary on the Zabbix server before restarting the Zabbix server software:

	[root@zabbix ~]# grep AlertScriptsPath /etc/zabbix/zabbix_server.conf
	### Option: AlertScriptsPath
	AlertScriptsPath=/usr/local/share/zabbix/alertscripts

	[root@zabbix ~]# ls -lh /usr/local/share/zabbix/alertscripts/slack.sh
	-rwxr-xr-x 1 root root 1.7K Dec 27 13:25 /usr/local/share/zabbix/alertscripts/slack.sh

An incoming web-hook integration must be created within your Slack.com account which can be done at https://slack.com/services/new/incoming-webhook

TODO: screenshots/better explanation of the set-up on both slack.com and within the zabbix web interface

* More information:

 * Zabbix (2.2) custom alertscripts documentation:
  * https://www.zabbix.com/documentation/2.2/manual/config/notifications/media/script<commit_msg>more readme fixes<commit_after>
Zabbix Slack AlertScript
========================

I got a chance to write this custom Zabbix alert script for work to have Zabbix send alerts to a channel on our [Slack.com](https://slack.com/) account and could not find any already existing or similar scripts. However, this script likely only works with Zabbix 2.0 or greater - it has not been tested with Zabbix 1.8 or earlier.

The "slack.sh" script needs to be placed in the "AlertScriptsPath" directory that is specified within the Zabbix servers' configuration file (zabbix_server.conf) and must be executable by the user (usually "zabbix") running the zabbix_server binary on the Zabbix server before restarting the Zabbix server software:

	[root@zabbix ~]# grep AlertScriptsPath /etc/zabbix/zabbix_server.conf
	### Option: AlertScriptsPath
	AlertScriptsPath=/usr/local/share/zabbix/alertscripts

	[root@zabbix ~]# ls -lh /usr/local/share/zabbix/alertscripts/slack.sh
	-rwxr-xr-x 1 root root 1.7K Dec 27 13:25 /usr/local/share/zabbix/alertscripts/slack.sh

An incoming web-hook integration must be created within your Slack.com account which can be done at https://slack.com/services/new/incoming-webhook

TODO: screenshots/better explanation of the set-up on both slack.com and within the zabbix web interface

* More information:

 * [Zabbix (2.2) custom alertscripts documentation](https://www.zabbix.com/documentation/2.2/manual/config/notifications/media/script)
{'fraction_non_alphanumeric': 0.08638562543192813, 'fraction_numerical': 0.011748445058742226, 'mean_word_length': 4.732673267326732, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6010899', 'n_tokens_mistral': 927, 'n_tokens_neox': 872, 'n_words': 329}