[Check_mk (english)] Flexible notification

Hi,

I have question about flexible notification. There is HTML mail with graphs.

But in my installation graph are not in emails.

I tryed to edit paths in script from

/pnp4nagios/htdocs/index.pnp

to

/pnp4nagios/index.php but it doesnt work.

from browser i can use:

http://servername/pnp4nagios -> url is rewriten to first host

http://servername/pnp4nagios/graph?host=ESX3

same situation is with

http://servername/pnp4nagios/index.php

after:

http://servername/pnp4nagios/json?host=ESX3&srv=Uptime&view=0

I got

[{“image_url”:“host=ESX3&srv=Uptime&source=0&view=0”,“ds_name”:“uptime”,“start”:1364609767,“end”:1364624167,“title”:“4 Hours”}]

Any ideas?

Best Regards

Jan Kašpar

Hi Jan,

If you open the file: check_mk/notifications/mail and find there: the function “fetch_pnp_data” you will see:

316 def fetch_pnp_data(context, params):

317 try:
318 prefix_url = “%s/share” % context[‘OMD_ROOT’]
319 except:
320 # Non-omd environment
321 prefix_url = “”
322 return os.popen(‘REMOTE_USER=“%s” php %s/pnp4nagios/htdocs/index.php “%s”’ % (context[‘CONTACTNAME’], prefix_url, params)).read()

So you need to add a path to prefix_url i.e:

prefix_url = “/usr/share”

Best wishes,
Maksym

···

On 30 Mar 2013, at 07:18, Jan Kašpar caspi@caspi.cz wrote:

Hi,

I have question about flexible notification. There is HTML mail with graphs.

But in my installation graph are not in emails.

I tryed to edit paths in script from

/pnp4nagios/htdocs/index.pnp

to

/pnp4nagios/index.php but it doesnt work.

from browser i can use:

http://servername/pnp4nagios → url is rewriten to first host

http://servername/pnp4nagios/graph?host=ESX3

same situation is with

http://servername/pnp4nagios/index.php

after:

http://servername/pnp4nagios/json?host=ESX3&srv=Uptime&view=0

I got

[{“image_url”:“host=ESX3&srv=Uptime&source=0&view=0”,“ds_name”:“uptime”,“start”:1364609767,“end”:1364624167,“title”:“4 Hours”}]

Any ideas?

Best Regards

Jan Kašpar


checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Hi,

thank you very much. I tryed to use only http path. Now everything is working great.

Script slouhd be rewriten, HTML is bad in Outlook 2013.

Thank you very much.

···

Jan Kaspar

2013/4/2 Maksym mt@primats.org.ua

Hi Jan,

If you open the file: check_mk/notifications/mail and find there: the function “fetch_pnp_data” you will see:

316 def fetch_pnp_data(context, params):

317 try:
318 prefix_url = “%s/share” % context[‘OMD_ROOT’]
319 except:
320 # Non-omd environment
321 prefix_url = “”
322 return os.popen(‘REMOTE_USER=“%s” php %s/pnp4nagios/htdocs/index.php “%s”’ % (context[‘CONTACTNAME’], prefix_url, params)).read()

So you need to add a path to prefix_url i.e:

prefix_url = “/usr/share”

Best wishes,
Maksym

On 30 Mar 2013, at 07:18, Jan Kašpar caspi@caspi.cz wrote:

Hi,

I have question about flexible notification. There is HTML mail with graphs.

But in my installation graph are not in emails.

I tryed to edit paths in script from

/pnp4nagios/htdocs/index.pnp

to

/pnp4nagios/index.php but it doesnt work.

from browser i can use:

http://servername/pnp4nagios → url is rewriten to first host

http://servername/pnp4nagios/graph?host=ESX3

same situation is with

http://servername/pnp4nagios/index.php

after:

http://servername/pnp4nagios/json?host=ESX3&srv=Uptime&view=0

I got

[{“image_url”:“host=ESX3&srv=Uptime&source=0&view=0”,“ds_name”:“uptime”,“start”:1364609767,“end”:1364624167,“title”:“4 Hours”}]

Any ideas?

Best Regards

Jan Kašpar


checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en


S pozdravem

Jan Kašpar