default options in acknowledgements

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
User avatar
jssingh
Posts: 110
Joined: Mon Apr 29, 2013 4:55 pm

default options in acknowledgements

Post by jssingh »

Is there a way to change the default options in acknowledgements? Or even better, can I just not give people the Sticky Notification option?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: default options in acknowledgements

Post by tmcdonald »

Funny you should ask :)

https://github.com/NagiosEnterprises/na ... -112261353

Just did this on my own branch. It's not rolled into Core proper yet, so you'll have to apply it manually. It's written into Core 4.1rc1 so if you are on 4.0.8 it might not be a clean apply.

Let me know if you need any help.
Former Nagios employee
User avatar
jssingh
Posts: 110
Joined: Mon Apr 29, 2013 4:55 pm

Re: default options in acknowledgements

Post by jssingh »

That's great!

Is there a patch for this or how would it be best to apply this? I am on 4.0.8 although it is possible that I'm not on 4.0.8 proper. The devs fixed a bug for me so I think I'm using a version that I got off of github.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: default options in acknowledgements

Post by tmcdonald »

Do you still have the source laying around? If so I could just cherry-pick the changes (there aren't many) and send you back the modified .tar.gz
Former Nagios employee
User avatar
jssingh
Posts: 110
Joined: Mon Apr 29, 2013 4:55 pm

Re: default options in acknowledgements

Post by jssingh »

I do. What is the best way to get it to you?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: default options in acknowledgements

Post by tmcdonald »

PM me and we will continue from there. I'll lock this up for the time-being.

Edit: Unlocked. Let me know how it works out for you.
Former Nagios employee
User avatar
jssingh
Posts: 110
Joined: Mon Apr 29, 2013 4:55 pm

Re: default options in acknowledgements

Post by jssingh »

Can you double check line 449 in cgiutils.c? It looks like there is a curly brace instead of the line you meant to put there.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: default options in acknowledgements

Post by tmcdonald »

Ahh, yes. It should be:

Code: Select all

        else if(!strcmp(var, "ack_no_sticky"))
            ack_no_sticky = (atoi(val) > 0) ? TRUE : FALSE;
        else if(!strcmp(var, "ack_no_send"))
            ack_no_send = (atoi(val) > 0) ? TRUE : FALSE;
		}
Former Nagios employee
User avatar
jssingh
Posts: 110
Joined: Mon Apr 29, 2013 4:55 pm

Re: default options in acknowledgements

Post by jssingh »

It worked!! Thank you. :D
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: default options in acknowledgements

Post by tmcdonald »

Great to hear!

I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked