Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script or SMS alert #139

Closed
qhh0205 opened this issue Sep 10, 2017 · 5 comments
Closed

Script or SMS alert #139

qhh0205 opened this issue Sep 10, 2017 · 5 comments

Comments

@qhh0205
Copy link

qhh0205 commented Sep 10, 2017

Hi,
Does 411 support the scrip alert or sms alert? I want to custom my own alarm channel, does is support that? Just like the Zabbix alert setting.

@quintanilhar
Copy link
Contributor

Hey @qianghaohao, You can create your own alert targets, I found the #71 PR where the Pagerdutty target was added and you might use as a guide implementing your own.

Let me know if you have any doubts implementing your target.

@qhh0205
Copy link
Author

qhh0205 commented Sep 11, 2017

Hi @quintanilhar, Thanks for your reply. That means i need to write php code to implement? If 411 supports scripts target, that would be wonderful. In script, we can alert whatever we want, such as email, sms, phone and so one. I am not familiar with php, but i will have a try, thank you.

@kiwiz
Copy link
Contributor

kiwiz commented Sep 11, 2017

@qianghaohao It sounds like the Pagerduty target may do what you want. You can specify a callback url in 411 and configure your alerting prefs on the Pagerduty site.

@qhh0205
Copy link
Author

qhh0205 commented Sep 11, 2017

@kiwiz Ok, thank you. Another question, it seems that 411 can't specify the index what i want to search. So where to specify the Es index name to search?

@quintanilhar
Copy link
Contributor

quintanilhar commented Sep 12, 2017

Hey @qianghaohao, you can create as many indexes as your needs, just create a new key following this structure https://github.com/etsy/411/blob/master/config_example.php#L116.

ex.:

    'logstash' => [
        'hosts' => ['http://localhost:9200'],
        'index_hosts' => [],
        'ssl_cert' => null,
        'index' => '[logstash-]Y.m.d',
        'date_based' => true,
        'date_interval' => 'd',
        'date_field' => '@timestamp',
        'date_type' => null,
        'src_url' => null,
    ],
    'my-searchable-index' => [
        'hosts' => ['http://localhost:9200'],
        'index_hosts' => [],
        'ssl_cert' => null,
        'index' => 'mynewindex',
        'date_based' => null,
        'date_interval' => null,
        'date_field' => 'mydatefield',
        'date_type' => null,
        'src_url' => null,
    ],

PS: The logstash config is not required, you can just delete or update it with your own indexes.

@kiwiz kiwiz closed this as completed Oct 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants