I need help to save the chat history of all users in the server for monitoring
You can save audit logs, yes (just turn it on in the admin console).
However, to do any sort of decent searching on logs, you’'ll need the Enterprise version, or to write something yourself.
What Openfire cannot do is save chat history for a particular user and display it back to the user when they continue a conversation with someone; that’‘s a client side feature. There’‘s an XEP for that, but Openfire doesn’'t implement it.