# Xpack credit card alert

**URL:** <https://discuss.elastic.co/t/xpack-credit-card-alert/71095>\
**Category:** Elasticsearch\
**Created:** [January 10, 2017, 1:44pm UTC](https://discuss.elastic.co/t/xpack-credit-card-alert/71095 "2017-01-10T13:44:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arpit\_Gupta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arpit_gupta/32/14436_2.png) [@Arpit\_Gupta](https://discuss.elastic.co/u/Arpit_Gupta)\
**Post date:** [January 10, 2017, 1:44pm UTC](https://discuss.elastic.co/t/xpack-credit-card-alert/71095/1 "2017-01-10T13:44:49Z")

</div>

Hi,

How to get alert if credit card information is visible in logs.  
I am not able to get stuff for it.

Thanks

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 11, 2017, 8:29am UTC](https://discuss.elastic.co/t/xpack-credit-card-alert/71095/2 "2017-01-11T08:29:43Z")

</div>

Hey,

this is impossible to answer if you dont provide any information. Please provide (in a verbose way!) your intention, the data model you are working on, your queries to find credit card information, your watches etc. There is no possible way to guess any of these. Thank you

--Alex

---

<div class="post-metadata">

**Author:** ![Arpit\_Gupta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arpit_gupta/32/14436_2.png) [@Arpit\_Gupta](https://discuss.elastic.co/u/Arpit_Gupta)\
**Post date:** [January 11, 2017, 10:53am UTC](https://discuss.elastic.co/t/xpack-credit-card-alert/71095/3 "2017-01-11T10:53:34Z")

</div>

Hi,

Actually i am new in xpack.  
i want alert if credit card no is visible in my log message.

my basic logic is if there is any 16 digit no in logs message that no might be credit card no.

also may be xpack providing in build api for detecting credit card information check this link --\> [https://www.elastic.co/products/x-pack/alerting](https://www.elastic.co/products/x-pack/alerting) they have mention in down  
"Credit card numbers are visible in your application logs"  
but not able to find any data in doc related to it to implement it.

my log message is like --\> 10/01/2017 04:05:59 TRACE - [com.hns.iag.sm.dao.oracle.OraOrderDAO] 5423650268430311 credit card no for order id 28142272

let me know if you can help me.

Thanks

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 11, 2017, 11:25am UTC](https://discuss.elastic.co/t/xpack-credit-card-alert/71095/4 "2017-01-11T11:25:36Z")

</div>

Hey,

the listing over there is just an example of what you **can** do with it. If you have a log message like the above, you would need to implement a search that finds those kind of log lines - i.e. searching for `credit card` in your logs could already reveal such log lines. But maybe you want to step further and actually use a regular expression search and find the concrete format that is logged - this all depends on your use-case.

In order to write a watch that alerts on such things you need to

1. Write a regular query that finds exactly what you are looking for (this is independent from alerting)
2. Use the above query in a watch
3. Decide how alerting should look like. Do you want to be alerted for each entry, is one alerting for a group of entries sufficient, etc...

Hope this makes sense.

--Alex

---

<div class="post-metadata">

**Author:** ![Arpit\_Gupta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arpit_gupta/32/14436_2.png) [@Arpit\_Gupta](https://discuss.elastic.co/u/Arpit_Gupta)\
**Post date:** [January 11, 2017, 11:51am UTC](https://discuss.elastic.co/t/xpack-credit-card-alert/71095/5 "2017-01-11T11:51:54Z")

</div>

thanks alex.

can you give demo sample for watch to use regular expression.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 8, 2017, 11:52am UTC](https://discuss.elastic.co/t/xpack-credit-card-alert/71095/6 "2017-02-08T11:52:02Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
